diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-02 16:45:19 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-02 16:45:19 +0000 |
commit | 25a407726e1e4ba84857b6b9de97e4d732119ca9 (patch) | |
tree | 0916df3a3da4acc70756ee4940946855d250b081 /ui/base | |
parent | 6e0b0d2271fa33774cd46f3677c1b61370f04116 (diff) | |
download | chromium_src-25a407726e1e4ba84857b6b9de97e4d732119ca9.zip chromium_src-25a407726e1e4ba84857b6b9de97e4d732119ca9.tar.gz chromium_src-25a407726e1e4ba84857b6b9de97e4d732119ca9.tar.bz2 |
Sort out build dependencies for LinuxUI.
LinuxUI now needs to vend NativeTheme instances into code in views/. This means
it can't live in ui/base/ because ui/native_theme depends on ui/base/.
LinuxUI used to live entirely in ui/base/. When ShellDialog was split off of
ui/base/, an intermediary derived interfact was created in ui/shell_dialogs,
requiring casting. This a bit ugly and has been cleaned up.
It makes more sense to have LinuxUI depend on NativeTheme and ShellDialog, and
in turn, be depended on by classes in ui/views/ and chrome/. This patch only moves
files and adds interfaces; the actual NativeThemeGtk2 instance will land in
a separate patch.
BUG=130810
Review URL: https://chromiumcodereview.appspot.com/12315139
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r-- | ui/base/linux_ui.cc | 24 | ||||
-rw-r--r-- | ui/base/linux_ui.h | 50 |
2 files changed, 0 insertions, 74 deletions
diff --git a/ui/base/linux_ui.cc b/ui/base/linux_ui.cc deleted file mode 100644 index 0f9ed4c..0000000 --- a/ui/base/linux_ui.cc +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/base/linux_ui.h" - -namespace { - -ui::LinuxUI* g_linux_ui = NULL; - -} // namespace - -namespace ui { - -void LinuxUI::SetInstance(LinuxUI* instance) { - delete g_linux_ui; - g_linux_ui = instance; -} - -const LinuxUI* LinuxUI::instance() { - return g_linux_ui; -} - -} // namespace ui diff --git a/ui/base/linux_ui.h b/ui/base/linux_ui.h deleted file mode 100644 index 87b19b5f..0000000 --- a/ui/base/linux_ui.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_BASE_LINUX_UI_H_ -#define UI_BASE_LINUX_UI_H_ - -#include "ui/base/ui_export.h" -#include "third_party/skia/include/core/SkColor.h" - -// The main entrypoint into Linux toolkit specific code. GTK code should only -// be executed behind this interface. - -namespace gfx { -class Image; -} - -namespace ui { -class SelectFilePolicy; - -// Adapter class with targets to render like different toolkits. Set by any -// project that wants to do linux desktop native rendering. -// -// TODO(erg): We're hardcoding GTK2, when we'll need to have backends for (at -// minimum) GTK2 and GTK3. LinuxUI::instance() should actually be a very -// complex method that pokes around with dlopen against a libuigtk2.so, a -// liuigtk3.so, etc. -class UI_EXPORT LinuxUI { - public: - virtual ~LinuxUI() {} - - // Sets the dynamically loaded singleton that draws the desktop native UI. - static void SetInstance(LinuxUI* instance); - - // Returns a LinuxUI instance for the toolkit used in the user's desktop - // environment. - // - // Can return NULL, in case no toolkit has been set. (For example, if we're - // running with the "--ash" flag.) - static const LinuxUI* instance(); - - // Returns an themed image per theme_provider.h - virtual bool UseNativeTheme() const = 0; - virtual gfx::Image* GetThemeImageNamed(int id) const = 0; - virtual bool GetColor(int id, SkColor* color) const = 0; -}; - -} // namespace ui - -#endif // UI_BASE_LINUX_UI_H_ |