1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/linux/fake_linux_ui.h"
#include "base/time/time.h"
#include "ui/base/ime/linux/linux_input_method_context.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/font_render_params.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image.h"
#include "ui/linux/nav_button_provider.h"
#include "ui/shell_dialogs/select_file_policy.h"
namespace ui {
FakeLinuxUi::FakeLinuxUi() = default;
FakeLinuxUi::~FakeLinuxUi() = default;
std::unique_ptr<ui::LinuxInputMethodContext>
FakeLinuxUi::CreateInputMethodContext(
ui::LinuxInputMethodContextDelegate* delegate) const {
return nullptr;
}
gfx::FontRenderParams FakeLinuxUi::GetDefaultFontRenderParams() const {
return gfx::FontRenderParams();
}
void FakeLinuxUi::GetDefaultFontDescription(
std::string* family_out,
int* size_pixels_out,
int* style_out,
int* weight_out,
gfx::FontRenderParams* params_out) const {}
ui::SelectFileDialog* FakeLinuxUi::CreateSelectFileDialog(
void* listener,
std::unique_ptr<ui::SelectFilePolicy> policy) const {
return nullptr;
}
bool FakeLinuxUi::Initialize() {
return false;
}
bool FakeLinuxUi::GetColor(int id,
SkColor* color,
bool use_custom_frame) const {
return false;
}
bool FakeLinuxUi::GetDisplayProperty(int id, int* result) const {
return false;
}
void FakeLinuxUi::GetFocusRingColor(SkColor* color) const {
*color = gfx::kPlaceholderColor;
}
void FakeLinuxUi::GetActiveSelectionBgColor(SkColor* color) const {
*color = gfx::kPlaceholderColor;
}
void FakeLinuxUi::GetActiveSelectionFgColor(SkColor* color) const {
*color = gfx::kPlaceholderColor;
}
void FakeLinuxUi::GetInactiveSelectionBgColor(SkColor* color) const {
*color = gfx::kPlaceholderColor;
}
void FakeLinuxUi::GetInactiveSelectionFgColor(SkColor* color) const {
*color = gfx::kPlaceholderColor;
}
base::TimeDelta FakeLinuxUi::GetCursorBlinkInterval() const {
return base::TimeDelta();
}
gfx::Image FakeLinuxUi::GetIconForContentType(const std::string& content_type,
int size,
float scale) const {
return gfx::Image();
}
LinuxUi::WindowFrameAction FakeLinuxUi::GetWindowFrameAction(
WindowFrameActionSource source) {
return WindowFrameAction::kNone;
}
bool FakeLinuxUi::PreferDarkTheme() const {
return false;
}
void FakeLinuxUi::SetDarkTheme(bool dark) {}
bool FakeLinuxUi::AnimationsEnabled() const {
return true;
}
void FakeLinuxUi::AddWindowButtonOrderObserver(
ui::WindowButtonOrderObserver* observer) {}
void FakeLinuxUi::RemoveWindowButtonOrderObserver(
ui::WindowButtonOrderObserver* observer) {}
std::unique_ptr<ui::NavButtonProvider> FakeLinuxUi::CreateNavButtonProvider() {
return nullptr;
}
ui::WindowFrameProvider* FakeLinuxUi::GetWindowFrameProvider(bool solid_frame) {
return nullptr;
}
base::flat_map<std::string, std::string> FakeLinuxUi::GetKeyboardLayoutMap() {
return base::flat_map<std::string, std::string>();
}
std::string FakeLinuxUi::GetCursorThemeName() {
return std::string();
}
int FakeLinuxUi::GetCursorThemeSize() {
return 0;
}
ui::NativeTheme* FakeLinuxUi::GetNativeTheme() const {
return nullptr;
}
bool FakeLinuxUi::GetTextEditCommandsForEvent(
const ui::Event& event,
int text_falgs,
std::vector<ui::TextEditCommandAuraLinux>* commands) {
return false;
}
#if BUILDFLAG(ENABLE_PRINTING)
printing::PrintDialogLinuxInterface* FakeLinuxUi::CreatePrintDialog(
printing::PrintingContextLinux* context) {
return nullptr;
}
gfx::Size FakeLinuxUi::GetPdfPaperSize(
printing::PrintingContextLinux* context) {
return gfx::Size();
}
#endif
} // namespace ui
|