diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 18:24:33 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 18:24:33 +0000 |
commit | 55ad8c14c31df30801d8422e81b78322f95c0526 (patch) | |
tree | c0fe47685194fd2137c658944589c439d93b0c8b /ash/shelf | |
parent | f3eccd0dfd02eb6b32c1a233e28439fc1a241d65 (diff) | |
download | chromium_src-55ad8c14c31df30801d8422e81b78322f95c0526.zip chromium_src-55ad8c14c31df30801d8422e81b78322f95c0526.tar.gz chromium_src-55ad8c14c31df30801d8422e81b78322f95c0526.tar.bz2 |
Screen cleanup:
* Split ScreenAsh to ScreenUtil (set of utility functions) and the screen implementation.
* moved screen_ash from Shell to DisplayManager. Ash specific imp is now hidden in DisplayManager.
* Shell now creates a separate screen object which simply keeps the list of displays for shutdown. This allow all screen operation valid during shutdown.
BUG=None
TBR=hongbo.min@intel.com,sky@chromium.org
Review URL: https://codereview.chromium.org/138003007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shelf')
-rw-r--r-- | ash/shelf/shelf.cc | 4 | ||||
-rw-r--r-- | ash/shelf/shelf_layout_manager.cc | 8 | ||||
-rw-r--r-- | ash/shelf/shelf_layout_manager_unittest.cc | 1 |
3 files changed, 6 insertions, 7 deletions
diff --git a/ash/shelf/shelf.cc b/ash/shelf/shelf.cc index e016875..51a90d1 100644 --- a/ash/shelf/shelf.cc +++ b/ash/shelf/shelf.cc @@ -9,7 +9,7 @@ #include "ash/focus_cycler.h" #include "ash/root_window_controller.h" -#include "ash/screen_ash.h" +#include "ash/screen_util.h" #include "ash/shelf/shelf_delegate.h" #include "ash/shelf/shelf_item_delegate.h" #include "ash/shelf/shelf_item_delegate_manager.h" @@ -95,7 +95,7 @@ gfx::Rect Shelf::GetScreenBoundsOfItemIconForWindow(aura::Window* window) { void Shelf::UpdateIconPositionForWindow(aura::Window* window) { shelf_view_->UpdatePanelIconPosition( GetLauncherIDForWindow(window), - ScreenAsh::ConvertRectFromScreen( + ScreenUtil::ConvertRectFromScreen( shelf_widget()->GetNativeView(), window->GetBoundsInScreen()).CenterPoint()); } diff --git a/ash/shelf/shelf_layout_manager.cc b/ash/shelf/shelf_layout_manager.cc index a298a90..3f22fce 100644 --- a/ash/shelf/shelf_layout_manager.cc +++ b/ash/shelf/shelf_layout_manager.cc @@ -12,7 +12,7 @@ #include "ash/ash_switches.h" #include "ash/root_window_controller.h" -#include "ash/screen_ash.h" +#include "ash/screen_util.h" #include "ash/session_state_delegate.h" #include "ash/shelf/shelf.h" #include "ash/shelf/shelf_bezel_event_filter.h" @@ -271,7 +271,7 @@ ShelfAlignment ShelfLayoutManager::GetAlignment() const { gfx::Rect ShelfLayoutManager::GetIdealBounds() { gfx::Rect bounds( - ScreenAsh::GetDisplayBoundsInParent(shelf_->GetNativeView())); + ScreenUtil::GetDisplayBoundsInParent(shelf_->GetNativeView())); int width = 0, height = 0; GetShelfSize(&width, &height); return SelectValueForShelfAlignment( @@ -674,7 +674,7 @@ void ShelfLayoutManager::UpdateBoundsAndOpacity( status_animation_setter.AddObserver(observer); GetLayer(shelf_)->SetOpacity(target_bounds.opacity); - shelf_->SetBounds(ScreenAsh::ConvertRectToScreen( + shelf_->SetBounds(ScreenUtil::ConvertRectToScreen( shelf_->GetNativeView()->parent(), target_bounds.shelf_bounds_in_root)); @@ -688,7 +688,7 @@ void ShelfLayoutManager::UpdateBoundsAndOpacity( status_bounds.set_y(status_bounds.y() + target_bounds.shelf_bounds_in_root.y()); shelf_->status_area_widget()->SetBounds( - ScreenAsh::ConvertRectToScreen( + ScreenUtil::ConvertRectToScreen( shelf_->status_area_widget()->GetNativeView()->parent(), status_bounds)); Shell::GetInstance()->SetDisplayWorkAreaInsets( diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc index 5c6d36b..9ed79d7 100644 --- a/ash/shelf/shelf_layout_manager_unittest.cc +++ b/ash/shelf/shelf_layout_manager_unittest.cc @@ -10,7 +10,6 @@ #include "ash/display/display_manager.h" #include "ash/focus_cycler.h" #include "ash/root_window_controller.h" -#include "ash/screen_ash.h" #include "ash/session_state_delegate.h" #include "ash/shelf/shelf.h" #include "ash/shelf/shelf_layout_manager_observer.h" |