1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ozone/ui/webui/ozone_webui.h"
9 #include "base/command_line.h"
10 #include "base/debug/leak_annotations.h"
11 #include "base/environment.h"
12 #include "base/i18n/rtl.h"
13 #include "base/logging.h"
14 #include "base/nix/mime_util_xdg.h"
15 #include "base/stl_util.h"
16 #include "base/strings/stringprintf.h"
17 #include "ozone/ui/webui/select_file_dialog_impl_webui.h"
21 OzoneWebUI::OzoneWebUI() {
24 OzoneWebUI::~OzoneWebUI() {
27 void OzoneWebUI::Initialize() {
30 ui::SelectFileDialog* OzoneWebUI::CreateSelectFileDialog(
31 ui::SelectFileDialog::Listener* listener,
32 ui::SelectFilePolicy* policy) const {
33 return ui::SelectFileDialogImplWebUI::Create(listener, policy);
36 scoped_ptr<ui::LinuxInputMethodContext> OzoneWebUI::CreateInputMethodContext(
37 ui::LinuxInputMethodContextDelegate* delegate) const {
38 return scoped_ptr<ui::LinuxInputMethodContext>();
41 gfx::FontRenderParams OzoneWebUI::GetDefaultFontRenderParams() const {
46 scoped_ptr<gfx::ScopedPangoFontDescription>
47 OzoneWebUI::GetDefaultPangoFontDescription() const {
49 return scoped_ptr<gfx::ScopedPangoFontDescription>();
52 double OzoneWebUI::GetFontDPI() const {
57 gfx::Image OzoneWebUI::GetThemeImageNamed(int id) const {
61 bool OzoneWebUI::GetColor(int id, SkColor* color) const {
65 bool OzoneWebUI::HasCustomImage(int id) const {
69 SkColor OzoneWebUI::GetFocusRingColor() const {
73 SkColor OzoneWebUI::GetThumbActiveColor() const {
77 SkColor OzoneWebUI::GetThumbInactiveColor() const {
81 SkColor OzoneWebUI::GetTrackColor() const {
85 SkColor OzoneWebUI::GetActiveSelectionBgColor() const {
89 SkColor OzoneWebUI::GetActiveSelectionFgColor() const {
93 SkColor OzoneWebUI::GetInactiveSelectionBgColor() const {
97 SkColor OzoneWebUI::GetInactiveSelectionFgColor() const {
101 double OzoneWebUI::GetCursorBlinkInterval() const {
105 ui::NativeTheme* OzoneWebUI::GetNativeTheme(aura::Window* window) const {
109 void OzoneWebUI::SetNativeThemeOverride(
110 const NativeThemeGetter& callback) {
113 bool OzoneWebUI::GetDefaultUsesSystemTheme() const {
117 void OzoneWebUI::SetDownloadCount(int count) const {
120 void OzoneWebUI::SetProgressFraction(float percentage) const {
123 bool OzoneWebUI::IsStatusIconSupported() const {
127 scoped_ptr<StatusIconLinux> OzoneWebUI::CreateLinuxStatusIcon(
128 const gfx::ImageSkia& image,
129 const base::string16& tool_tip) const {
130 return scoped_ptr<views::StatusIconLinux>();
133 gfx::Image OzoneWebUI::GetIconForContentType(
134 const std::string& content_type, int size) const {
138 scoped_ptr<Border> OzoneWebUI::CreateNativeBorder(
139 views::LabelButton* owning_button,
140 scoped_ptr<views::LabelButtonBorder> border) {
141 return border.Pass();
144 void OzoneWebUI::AddWindowButtonOrderObserver(
145 WindowButtonOrderObserver* observer) {
148 void OzoneWebUI::RemoveWindowButtonOrderObserver(
149 WindowButtonOrderObserver* observer) {
152 bool OzoneWebUI::UnityIsRunning() {
156 LinuxUI::NonClientMiddleClickAction
157 OzoneWebUI::GetNonClientMiddleClickAction() {
158 return MIDDLE_CLICK_ACTION_NONE;
161 void OzoneWebUI::NotifyWindowManagerStartupComplete() {
164 bool OzoneWebUI::MatchEvent(const ui::Event& event,
165 std::vector<TextEditCommandAuraLinux>* commands) {
171 views::LinuxUI* BuildWebUI() {
172 return new views::OzoneWebUI;