diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-10 09:22:19 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-10 09:22:19 +0000 |
commit | 5a991a2d02f5506288998ea73b619834f5c10920 (patch) | |
tree | bc436f40c5fa7cacd27b2be30a83d7dd717d4b2a | |
parent | 265415dfb20d0bc9e34b75fc76eb36a6f2c74cf7 (diff) | |
download | chromium_src-5a991a2d02f5506288998ea73b619834f5c10920.zip chromium_src-5a991a2d02f5506288998ea73b619834f5c10920.tar.gz chromium_src-5a991a2d02f5506288998ea73b619834f5c10920.tar.bz2 |
Merge the LinuxUI interface from its own .so into libviews.so.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/23922007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222239 0039d316-1c4b-4281-b951-d872f2087c98
21 files changed, 77 insertions, 97 deletions
diff --git a/chrome/browser/download/download_status_updater.cc b/chrome/browser/download/download_status_updater.cc index 5df688b..a2033de 100644 --- a/chrome/browser/download/download_status_updater.cc +++ b/chrome/browser/download/download_status_updater.cc @@ -10,7 +10,7 @@ #include "base/stl_util.h" #if defined(OS_LINUX) && !defined(OS_CHROMEOS) -#include "ui/linux_ui/linux_ui.h" +#include "ui/views/linux_ui/linux_ui.h" #endif namespace { @@ -137,7 +137,7 @@ void DownloadStatusUpdater::OnDownloadUpdated( void DownloadStatusUpdater::UpdateAppIconDownloadProgress( content::DownloadItem* download) { #if defined(OS_LINUX) && !defined(OS_CHROMEOS) - const ui::LinuxUI* linux_ui = ui::LinuxUI::instance(); + const views::LinuxUI* linux_ui = views::LinuxUI::instance(); if (linux_ui) { float progress = 0; int download_count = 0; diff --git a/chrome/browser/themes/theme_service_aurax11.cc b/chrome/browser/themes/theme_service_aurax11.cc index 96518b2..6dad99d 100644 --- a/chrome/browser/themes/theme_service_aurax11.cc +++ b/chrome/browser/themes/theme_service_aurax11.cc @@ -10,7 +10,7 @@ #include "chrome/browser/themes/custom_theme_supplier.h" #include "chrome/common/pref_names.h" #include "ui/gfx/image/image.h" -#include "ui/linux_ui/linux_ui.h" +#include "ui/views/linux_ui/linux_ui.h" namespace { @@ -29,7 +29,7 @@ class NativeThemeX11 : public CustomThemeSupplier { virtual ~NativeThemeX11(); // These pointers are not owned by us. - const ui::LinuxUI* const linux_ui_; + const views::LinuxUI* const linux_ui_; PrefService* const pref_service_; DISALLOW_COPY_AND_ASSIGN(NativeThemeX11); @@ -37,7 +37,7 @@ class NativeThemeX11 : public CustomThemeSupplier { NativeThemeX11::NativeThemeX11(PrefService* pref_service) : CustomThemeSupplier(NATIVE_X11), - linux_ui_(ui::LinuxUI::instance()), + linux_ui_(views::LinuxUI::instance()), pref_service_(pref_service) {} void NativeThemeX11::StartUsingTheme() { diff --git a/chrome/browser/themes/theme_service_factory.cc b/chrome/browser/themes/theme_service_factory.cc index 92fe85c..e91a160 100644 --- a/chrome/browser/themes/theme_service_factory.cc +++ b/chrome/browser/themes/theme_service_factory.cc @@ -20,7 +20,7 @@ #if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) #include "chrome/browser/themes/theme_service_aurax11.h" -#include "ui/linux_ui/linux_ui.h" +#include "ui/views/linux_ui/linux_ui.h" #endif // static @@ -74,7 +74,7 @@ void ThemeServiceFactory::RegisterProfilePrefs( #if defined(TOOLKIT_GTK) default_uses_system_theme = GtkThemeService::DefaultUsesSystemTheme(); #elif defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS) - const ui::LinuxUI* linux_ui = ui::LinuxUI::instance(); + const views::LinuxUI* linux_ui = views::LinuxUI::instance(); if (linux_ui) default_uses_system_theme = linux_ui->GetDefaultUsesSystemTheme(); #endif diff --git a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc index ad1ec3f..328b570 100644 --- a/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc +++ b/chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc @@ -14,7 +14,7 @@ #if defined(OS_LINUX) #include "chrome/browser/ui/libgtk2ui/gtk2_ui.h" -#include "ui/linux_ui/linux_ui.h" +#include "ui/views/linux_ui/linux_ui.h" #else #endif @@ -62,7 +62,7 @@ void ChromeBrowserMainExtraPartsAura::ToolkitInitialized() { #if !defined(USE_ASH) && defined(OS_LINUX) && defined(USE_X11) // TODO(erg): Refactor this into a dlopen call when we add a GTK3 port. - ui::LinuxUI::SetInstance(BuildGtk2UI()); + views::LinuxUI::SetInstance(BuildGtk2UI()); #endif } diff --git a/chrome/browser/ui/libgtk2ui/app_indicator_icon.h b/chrome/browser/ui/libgtk2ui/app_indicator_icon.h index 840f579..3dee501 100644 --- a/chrome/browser/ui/libgtk2ui/app_indicator_icon.h +++ b/chrome/browser/ui/libgtk2ui/app_indicator_icon.h @@ -9,7 +9,7 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/ui/libgtk2ui/gtk2_signal.h" #include "ui/base/models/menu_model.h" -#include "ui/linux_ui/status_icon_linux.h" +#include "ui/views/linux_ui/status_icon_linux.h" typedef struct _AppIndicator AppIndicator; typedef struct _GtkWidget GtkWidget; @@ -20,7 +20,7 @@ class ImageSkia; namespace libgtk2ui { -class AppIndicatorIcon : public StatusIconLinux { +class AppIndicatorIcon : public views::StatusIconLinux { public: // The id uniquely identifies the new status icon from other chrome status // icons. @@ -32,7 +32,7 @@ class AppIndicatorIcon : public StatusIconLinux { // Indicates whether libappindicator so could be opened. static bool CouldOpen(); - // Overridden from StatusIconLinux: + // Overridden from views::StatusIconLinux: virtual void SetImage(const gfx::ImageSkia& image) OVERRIDE; virtual void SetPressedImage(const gfx::ImageSkia& image) OVERRIDE; virtual void SetToolTip(const string16& tool_tip) OVERRIDE; diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc index 1376db2..ddbffa9 100644 --- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc +++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc @@ -395,17 +395,17 @@ bool Gtk2UI::IsStatusIconSupported() const { return AppIndicatorIcon::CouldOpen(); } -scoped_ptr<StatusIconLinux> Gtk2UI::CreateLinuxStatusIcon( +scoped_ptr<views::StatusIconLinux> Gtk2UI::CreateLinuxStatusIcon( const gfx::ImageSkia& image, const string16& tool_tip) const { if (AppIndicatorIcon::CouldOpen()) { ++indicators_count; - return scoped_ptr<StatusIconLinux>(new AppIndicatorIcon( + return scoped_ptr<views::StatusIconLinux>(new AppIndicatorIcon( base::StringPrintf("%s%d", kAppIndicatorIdPrefix, indicators_count), image, tool_tip)); } else { - return scoped_ptr<StatusIconLinux>(); + return scoped_ptr<views::StatusIconLinux>(); } } @@ -1042,6 +1042,6 @@ void Gtk2UI::ClearAllThemeData() { } // namespace libgtk2ui -ui::LinuxUI* BuildGtk2UI() { +views::LinuxUI* BuildGtk2UI() { return new libgtk2ui::Gtk2UI; } diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.h b/chrome/browser/ui/libgtk2ui/gtk2_ui.h index af57462..a925c06 100644 --- a/chrome/browser/ui/libgtk2ui/gtk2_ui.h +++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.h @@ -12,7 +12,7 @@ #include "chrome/browser/ui/libgtk2ui/libgtk2ui_export.h" #include "chrome/browser/ui/libgtk2ui/owned_widget_gtk2.h" #include "ui/gfx/color_utils.h" -#include "ui/linux_ui/linux_ui.h" +#include "ui/views/linux_ui/linux_ui.h" typedef struct _GdkColor GdkColor; typedef struct _GtkStyle GtkStyle; @@ -28,7 +28,7 @@ namespace libgtk2ui { // Interface to GTK2 desktop features. // -class Gtk2UI : public ui::LinuxUI { +class Gtk2UI : public views::LinuxUI { public: Gtk2UI(); virtual ~Gtk2UI(); @@ -48,7 +48,7 @@ class Gtk2UI : public ui::LinuxUI { virtual void SetDownloadCount(int count) const OVERRIDE; virtual void SetProgressFraction(float percentage) const OVERRIDE; virtual bool IsStatusIconSupported() const OVERRIDE; - virtual scoped_ptr<StatusIconLinux> CreateLinuxStatusIcon( + virtual scoped_ptr<views::StatusIconLinux> CreateLinuxStatusIcon( const gfx::ImageSkia& image, const string16& tool_tip) const OVERRIDE; @@ -170,6 +170,6 @@ class Gtk2UI : public ui::LinuxUI { // interface, because eventually this .so will be loaded through dlopen at // runtime so our main binary can conditionally load GTK2 or GTK3 or EFL or // QT or whatever. -LIBGTK2UI_EXPORT ui::LinuxUI* BuildGtk2UI(); +LIBGTK2UI_EXPORT views::LinuxUI* BuildGtk2UI(); #endif // CHROME_BROWSER_UI_LIBGTK2UI_GTK2_UI_H_ diff --git a/chrome/browser/ui/libgtk2ui/libgtk2ui.gyp b/chrome/browser/ui/libgtk2ui/libgtk2ui.gyp index d204857..503fac2 100644 --- a/chrome/browser/ui/libgtk2ui/libgtk2ui.gyp +++ b/chrome/browser/ui/libgtk2ui/libgtk2ui.gyp @@ -18,7 +18,7 @@ '../../../../ui/base/strings/ui_strings.gyp:ui_strings', '../../../../ui/ui.gyp:ui', '../../../../ui/ui.gyp:ui_resources', - '../../../../ui/linux_ui/linux_ui.gyp:linux_ui', + '../../../../ui/views/views.gyp:views', '../../../chrome_resources.gyp:chrome_extra_resources', '../../../chrome_resources.gyp:chrome_resources', '../../../chrome_resources.gyp:chrome_strings', diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.cc index 3656bd5..3e514bf 100644 --- a/chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.cc +++ b/chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.cc @@ -1,11 +1,13 @@ - // Copyright 2013 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 "chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h" -StatusIconLinuxWrapper::StatusIconLinuxWrapper(StatusIconLinux* status_icon) +#include "ui/views/linux_ui/linux_ui.h" + +StatusIconLinuxWrapper::StatusIconLinuxWrapper( + views::StatusIconLinux* status_icon) : menu_model_(NULL) { status_icon_.reset(status_icon); status_icon_->set_delegate(this); @@ -49,9 +51,9 @@ void StatusIconLinuxWrapper::OnMenuStateChanged() { StatusIconLinuxWrapper* StatusIconLinuxWrapper::CreateWrappedStatusIcon( const gfx::ImageSkia& image, const string16& tool_tip) { - const ui::LinuxUI* linux_ui = ui::LinuxUI::instance(); + const views::LinuxUI* linux_ui = views::LinuxUI::instance(); if (linux_ui) { - scoped_ptr<StatusIconLinux> status_icon = + scoped_ptr<views::StatusIconLinux> status_icon = linux_ui->CreateLinuxStatusIcon(image, tool_tip); if (status_icon.get()) return new StatusIconLinuxWrapper(status_icon.release()); diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h b/chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h index 30ccf1f..4b178e0 100644 --- a/chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h +++ b/chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h @@ -8,12 +8,12 @@ #include "base/memory/scoped_ptr.h" #include "chrome/browser/status_icons/desktop_notification_balloon.h" #include "chrome/browser/status_icons/status_icon.h" -#include "ui/linux_ui/linux_ui.h" +#include "ui/views/linux_ui/status_icon_linux.h" // Wrapper class for StatusIconLinux that implements the standard StatusIcon // interface. Also handles callbacks from StatusIconLinux. class StatusIconLinuxWrapper : public StatusIcon, - public StatusIconLinux::Delegate, + public views::StatusIconLinux::Delegate, public StatusIconMenuModel::Observer { public: virtual ~StatusIconLinuxWrapper(); @@ -48,12 +48,12 @@ class StatusIconLinuxWrapper : public StatusIcon, private: // A status icon wrapper should only be created by calling // CreateWrappedStatusIcon(). - explicit StatusIconLinuxWrapper(StatusIconLinux* status_icon); + explicit StatusIconLinuxWrapper(views::StatusIconLinux* status_icon); // Notification balloon. DesktopNotificationBalloon notification_; - scoped_ptr<StatusIconLinux> status_icon_; + scoped_ptr<views::StatusIconLinux> status_icon_; StatusIconMenuModel* menu_model_; diff --git a/chrome/browser/ui/views/status_icons/status_tray_linux.cc b/chrome/browser/ui/views/status_icons/status_tray_linux.cc index 58db07a..5482634 100644 --- a/chrome/browser/ui/views/status_icons/status_tray_linux.cc +++ b/chrome/browser/ui/views/status_icons/status_tray_linux.cc @@ -4,9 +4,9 @@ #include "chrome/browser/ui/views/status_icons/status_tray_linux.h" -#ifndef OS_CHROMEOS +#if !defined(OS_CHROMEOS) #include "chrome/browser/ui/views/status_icons/status_icon_linux_wrapper.h" -#include "ui/linux_ui/linux_ui.h" +#include "ui/views/linux_ui/linux_ui.h" StatusTrayLinux::StatusTrayLinux() { } @@ -22,14 +22,14 @@ StatusIcon* StatusTrayLinux::CreatePlatformStatusIcon( } StatusTray* StatusTray::Create() { - const ui::LinuxUI* linux_ui = ui::LinuxUI::instance(); + const views::LinuxUI* linux_ui = views::LinuxUI::instance(); // Only create a status tray if we can actually create status icons. if (linux_ui && linux_ui->IsStatusIconSupported()) return new StatusTrayLinux(); return NULL; } -#else +#else // defined(OS_CHROMEOS) StatusTray* StatusTray::Create() { return NULL; } diff --git a/chrome/chrome_browser_ui.gypi b/chrome/chrome_browser_ui.gypi index a24723f..4f0b5c3 100644 --- a/chrome/chrome_browser_ui.gypi +++ b/chrome/chrome_browser_ui.gypi @@ -2674,7 +2674,6 @@ # gtk2 is the only component that can interact with gtk2 in our new # world. 'browser/ui/libgtk2ui/libgtk2ui.gyp:gtk2ui', - '../ui/linux_ui/linux_ui.gyp:linux_ui', '../build/linux/system.gyp:gio', ], }], diff --git a/ui/linux_ui/linux_ui_export.h b/ui/linux_ui/linux_ui_export.h deleted file mode 100644 index 68f2ab5..0000000 --- a/ui/linux_ui/linux_ui_export.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 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_LINUX_UI_LINUX_UI_EXPORT_H_ -#define UI_LINUX_UI_LINUX_UI_EXPORT_H_ - -// Defines LINUX_UI_EXPORT so that functionality implemented by the -// native_theme library can be exported to consumers. - -#if defined(COMPONENT_BUILD) -#if defined(WIN32) - -#if defined(LINUX_UI_IMPLEMENTATION) -#define LINUX_UI_EXPORT __declspec(dllexport) -#else -#define LINUX_UI_EXPORT __declspec(dllimport) -#endif // defined(LINUX_UI_IMPLEMENTATION) - -#else // !defined(WIN32) - -#if defined(LINUX_UI_IMPLEMENTATION) -#define LINUX_UI_EXPORT __attribute__((visibility("default"))) -#else -#define LINUX_UI_EXPORT -#endif - -#endif // defined(WIN32) - -#else // !defined(COMPONENT_BUILD) - -#define LINUX_UI_EXPORT - -#endif // defined(COMPONENT_BUILD) - -#endif // UI_LINUX_UI_LINUX_UI_EXPORT_H_ diff --git a/ui/linux_ui/OWNERS b/ui/views/linux_ui/OWNERS index 4733a4f..4733a4f 100644 --- a/ui/linux_ui/OWNERS +++ b/ui/views/linux_ui/OWNERS diff --git a/ui/linux_ui/linux_ui.cc b/ui/views/linux_ui/linux_ui.cc index 40ead2f..9a4dccd 100644 --- a/ui/linux_ui/linux_ui.cc +++ b/ui/views/linux_ui/linux_ui.cc @@ -1,18 +1,18 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2013 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/linux_ui/linux_ui.h" +#include "ui/views/linux_ui/linux_ui.h" #include "ui/shell_dialogs/linux_shell_dialog.h" namespace { -ui::LinuxUI* g_linux_ui = NULL; +views::LinuxUI* g_linux_ui = NULL; } // namespace -namespace ui { +namespace views { void LinuxUI::SetInstance(LinuxUI* instance) { delete g_linux_ui; @@ -25,4 +25,4 @@ const LinuxUI* LinuxUI::instance() { return g_linux_ui; } -} // namespace ui +} // namespace views diff --git a/ui/linux_ui/linux_ui.gyp b/ui/views/linux_ui/linux_ui.gyp index c214076..7feb238 100644 --- a/ui/linux_ui/linux_ui.gyp +++ b/ui/views/linux_ui/linux_ui.gyp @@ -1,4 +1,4 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Copyright 2013 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. diff --git a/ui/linux_ui/linux_ui.h b/ui/views/linux_ui/linux_ui.h index f609e9a..8c0bf4c 100644 --- a/ui/linux_ui/linux_ui.h +++ b/ui/views/linux_ui/linux_ui.h @@ -1,14 +1,14 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright 2013 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_LINUX_UI_LINUX_UI_H_ -#define UI_LINUX_UI_LINUX_UI_H_ +#ifndef UI_VIEWS_LINUX_UI_LINUX_UI_H_ +#define UI_VIEWS_LINUX_UI_LINUX_UI_H_ #include "third_party/skia/include/core/SkColor.h" -#include "ui/linux_ui/linux_ui_export.h" -#include "ui/linux_ui/status_icon_linux.h" #include "ui/shell_dialogs/linux_shell_dialog.h" +#include "ui/views/linux_ui/status_icon_linux.h" +#include "ui/views/views_export.h" // The main entrypoint into Linux toolkit specific code. GTK code should only // be executed behind this interface. @@ -19,6 +19,9 @@ class Image; namespace ui { class NativeTheme; +} + +namespace views { // Adapter class with targets to render like different toolkits. Set by any // project that wants to do linux desktop native rendering. @@ -27,10 +30,7 @@ class NativeTheme; // 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. -// -// TODO(erg): This class should be folded into ui/views/ instead of living in -// its own component once we've deleted out the GTK+ port. -class LINUX_UI_EXPORT LinuxUI : public LinuxShellDialog { +class VIEWS_EXPORT LinuxUI : public ui::LinuxShellDialog { public: virtual ~LinuxUI() {} @@ -52,7 +52,7 @@ class LINUX_UI_EXPORT LinuxUI : public LinuxShellDialog { // Returns a NativeTheme that will provide system colors and draw system // style widgets. - virtual NativeTheme* GetNativeTheme() const = 0; + virtual ui::NativeTheme* GetNativeTheme() const = 0; // Returns whether we should be using the native theme provided by this // object by default. @@ -72,6 +72,6 @@ class LINUX_UI_EXPORT LinuxUI : public LinuxShellDialog { const string16& tool_tip) const = 0; }; -} // namespace ui +} // namespace views -#endif // UI_LINUX_UI_LINUX_UI_H_ +#endif // UI_VIEWS_LINUX_UI_LINUX_UI_H_ diff --git a/ui/linux_ui/status_icon_linux.cc b/ui/views/linux_ui/status_icon_linux.cc index 0e28771..bf2ec05 100644 --- a/ui/linux_ui/status_icon_linux.cc +++ b/ui/views/linux_ui/status_icon_linux.cc @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/linux_ui/status_icon_linux.h" +#include "ui/views/linux_ui/status_icon_linux.h" + +namespace views { StatusIconLinux::Delegate::~Delegate() { } @@ -15,3 +17,5 @@ StatusIconLinux::~StatusIconLinux() { void StatusIconLinux::RefreshPlatformContextMenu() { } + +} // namespace views diff --git a/ui/linux_ui/status_icon_linux.h b/ui/views/linux_ui/status_icon_linux.h index 2e3d3a9..5ed8be2 100644 --- a/ui/linux_ui/status_icon_linux.h +++ b/ui/views/linux_ui/status_icon_linux.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UI_LINUX_UI_STATUS_ICON_LINUX_H_ -#define UI_LINUX_UI_STATUS_ICON_LINUX_H_ +#ifndef UI_VIEWS_LINUX_UI_STATUS_ICON_LINUX_H_ +#define UI_VIEWS_LINUX_UI_STATUS_ICON_LINUX_H_ #include "base/strings/string16.h" -#include "ui/linux_ui/linux_ui_export.h" +#include "ui/views/views_export.h" namespace gfx { class ImageSkia; @@ -16,11 +16,13 @@ namespace ui { class MenuModel; } // namespace ui +namespace views { + // Since liblinux_ui cannot have dependencies on any chrome browser components // we cannot inherit from StatusIcon. So we implement the necessary methods // and let a wrapper class implement the StatusIcon interface and defer the // callbacks to a delegate. For the same reason, do not use StatusIconMenuModel. -class LINUX_UI_EXPORT StatusIconLinux { +class VIEWS_EXPORT StatusIconLinux { public: class Delegate { public: @@ -55,4 +57,6 @@ class LINUX_UI_EXPORT StatusIconLinux { Delegate* delegate_; }; +} // namespace views + #endif // UI_LINUX_UI_STATUS_ICON_LINUX_H_ diff --git a/ui/views/views.gyp b/ui/views/views.gyp index 34b8093..db247e6 100644 --- a/ui/views/views.gyp +++ b/ui/views/views.gyp @@ -313,6 +313,10 @@ 'layout/layout_constants.h', 'layout/layout_manager.cc', 'layout/layout_manager.h', + 'linux_ui/linux_ui.h', + 'linux_ui/linux_ui.cc', + 'linux_ui/status_icon_linux.h', + 'linux_ui/status_icon_linux.cc', 'metrics.cc', 'metrics.h', 'metrics_aura.cc', @@ -548,10 +552,13 @@ ['include', 'accessibility/native_view_accessibility_win.h'], ], }], - ['use_aura==1 and OS=="linux" and chromeos==0', { + ['OS=="linux" and chromeos==0', { 'dependencies': [ '../ui.gyp:shell_dialogs', - '../linux_ui/linux_ui.gyp:linux_ui', + ], + }, { # OS=="linux" and chromeos==0 + 'sources/': [ + ['exclude', 'linux_ui'], ], }], ['OS=="win"', { diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc index e405bf6..acb84ff 100644 --- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc +++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc @@ -25,13 +25,13 @@ #include "ui/base/x/x11_util.h" #include "ui/gfx/insets.h" #include "ui/gfx/path_x11.h" -#include "ui/linux_ui/linux_ui.h" #include "ui/native_theme/native_theme.h" #include "ui/views/corewm/compound_event_filter.h" #include "ui/views/corewm/corewm_switches.h" #include "ui/views/corewm/cursor_manager.h" #include "ui/views/corewm/focus_controller.h" #include "ui/views/ime/input_method.h" +#include "ui/views/linux_ui/linux_ui.h" #include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater_aurax11.h" #include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h" #include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h" @@ -1322,7 +1322,7 @@ DesktopRootWindowHost* DesktopRootWindowHost::Create( // static ui::NativeTheme* DesktopRootWindowHost::GetNativeTheme(aura::Window* window) { - const ui::LinuxUI* linux_ui = ui::LinuxUI::instance(); + const views::LinuxUI* linux_ui = views::LinuxUI::instance(); if (linux_ui) { ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(); if (native_theme) |