diff options
author | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-22 09:30:34 +0000 |
---|---|---|
committer | mukai@chromium.org <mukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-22 09:30:34 +0000 |
commit | 7bc49bd9d4db4d375b1994abfaec486eb5ace63a (patch) | |
tree | d1ff7ae0db5179d7353897477bd706ddcb26387c /ash | |
parent | 49e3b2cfe044dd2bfd1dac66f9145beefb2db32e (diff) | |
download | chromium_src-7bc49bd9d4db4d375b1994abfaec486eb5ace63a.zip chromium_src-7bc49bd9d4db4d375b1994abfaec486eb5ace63a.tar.gz chromium_src-7bc49bd9d4db4d375b1994abfaec486eb5ace63a.tar.bz2 |
Excludes ResolutionNotificationController for non-ChromeOS.
This feature is ChromeOS specific.
BUG=none
R=oshima@chromium.org
Review URL: https://codereview.chromium.org/137203008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@246258 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/ash.gyp | 6 | ||||
-rw-r--r-- | ash/shell.cc | 8 | ||||
-rw-r--r-- | ash/shell.h | 11 |
3 files changed, 18 insertions, 7 deletions
diff --git a/ash/ash.gyp b/ash/ash.gyp index 4c6d99c..77279fb 100644 --- a/ash/ash.gyp +++ b/ash/ash.gyp @@ -649,6 +649,8 @@ 'sources/': [ ['exclude', 'display/output_configurator_animation.cc'], ['exclude', 'display/output_configurator_animation.h'], + ['exclude', 'display/resolution_notification_controller.cc'], + ['exclude', 'display/resolution_notification_controller.h'], ], }], ], @@ -984,6 +986,10 @@ 'sources': [ 'first_run/first_run_helper_unittest.cc', ], + }, { # else: chromeos!=1 + 'sources/': [ + ['exclude', 'display/resolution_notification_controller_unittest.cc'], + ], }], ['OS=="linux" and component=="shared_library" and linux_use_tcmalloc==1', { 'dependencies': [ diff --git a/ash/shell.cc b/ash/shell.cc index 68b3d38..d5209fb 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -21,7 +21,6 @@ #include "ash/display/display_manager.h" #include "ash/display/event_transformation_handler.h" #include "ash/display/mouse_cursor_event_filter.h" -#include "ash/display/resolution_notification_controller.h" #include "ash/display/screen_position_controller.h" #include "ash/display/virtual_keyboard_window_controller.h" #include "ash/drag_drop/drag_drop_controller.h" @@ -125,6 +124,7 @@ #include "base/sys_info.h" #include "chromeos/display/output_configurator.h" #endif // defined(USE_X11) +#include "ash/display/resolution_notification_controller.h" #include "ash/sticky_keys/sticky_keys_controller.h" #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" #include "ash/system/chromeos/power/power_event_observer.h" @@ -705,7 +705,9 @@ Shell::~Shell() { power_button_controller_.reset(); lock_state_controller_.reset(); +#if defined(OS_CHROMEOS) resolution_notification_controller_.reset(); +#endif desktop_background_controller_.reset(); // This also deletes all RootWindows. Note that we invoke Shutdown() on @@ -722,7 +724,7 @@ Shell::~Shell() { media_delegate_.reset(); #if defined(OS_CHROMEOS) && defined(USE_X11) - if (display_change_observer_) + if (display_change_observer_) output_configurator_->RemoveObserver(display_change_observer_.get()); if (output_configurator_animation_) output_configurator_->RemoveObserver(output_configurator_animation_.get()); @@ -808,8 +810,10 @@ void Shell::Init() { aura::Window* root_window = display_controller_->GetPrimaryRootWindow(); target_root_window_ = root_window; +#if defined(OS_CHROMEOS) resolution_notification_controller_.reset( new internal::ResolutionNotificationController); +#endif cursor_manager_.SetDisplay(GetScreen()->GetPrimaryDisplay()); diff --git a/ash/shell.h b/ash/shell.h index 1d9dee7..a9a0d2a 100644 --- a/ash/shell.h +++ b/ash/shell.h @@ -484,7 +484,8 @@ class ASH_EXPORT Shell // Starts the animation that occurs on first login. void DoInitialWorkspaceAnimation(); -#if defined(OS_CHROMEOS) && defined(USE_X11) +#if defined(OS_CHROMEOS) +#if defined(USE_X11) // TODO(oshima): Move these objects to DisplayController. chromeos::OutputConfigurator* output_configurator() { return output_configurator_.get(); @@ -495,12 +496,13 @@ class ASH_EXPORT Shell internal::DisplayErrorObserver* display_error_observer() { return display_error_observer_.get(); } -#endif // defined(OS_CHROMEOS) && defined(USE_X11) +#endif // defined(USE_X11) internal::ResolutionNotificationController* resolution_notification_controller() { return resolution_notification_controller_.get(); } +#endif // defined(OS_CHROMEOS) WindowTreeHostFactory* root_window_host_factory() { return root_window_host_factory_.get(); @@ -683,6 +685,8 @@ class ASH_EXPORT Shell scoped_ptr<internal::UserActivityNotifier> user_activity_notifier_; scoped_ptr<internal::VideoActivityNotifier> video_activity_notifier_; scoped_ptr<StickyKeysController> sticky_keys_controller_; + scoped_ptr<internal::ResolutionNotificationController> + resolution_notification_controller_; #if defined(USE_X11) // Controls video output device state. scoped_ptr<chromeos::OutputConfigurator> output_configurator_; @@ -695,9 +699,6 @@ class ASH_EXPORT Shell #endif // defined(USE_X11) #endif // defined(OS_CHROMEOS) - scoped_ptr<internal::ResolutionNotificationController> - resolution_notification_controller_; - // |native_cursor_manager_| is owned by |cursor_manager_|, but we keep a // pointer to vend to test code. AshNativeCursorManager* native_cursor_manager_; |