Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: ash/wm/shelf_layout_manager.cc

Issue 10795013: Rename bounds accessors to be intuitive and consistent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/panel_layout_manager_unittest.cc ('k') | ash/wm/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/shelf_layout_manager.cc
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc
index 2b4031f325ce6d607deb2f29601c7882521dc801..16cd43c9c7e2b168012f32ce09dd3b2a9f2a06e4 100644
--- a/ash/wm/shelf_layout_manager.cc
+++ b/ash/wm/shelf_layout_manager.cc
@@ -182,7 +182,7 @@ bool ShelfLayoutManager::SetAlignment(ShelfAlignment alignment) {
gfx::Rect ShelfLayoutManager::GetIdealBounds() {
// TODO(oshima): this is wrong. Figure out what display shelf is on
// and everything should be based on it.
- gfx::Rect bounds(ScreenAsh::GetDisplayParentBounds(
+ gfx::Rect bounds(ScreenAsh::GetDisplayBoundsInParent(
status_->GetNativeView()));
int width = 0, height = 0;
GetShelfSize(&width, &height);
@@ -323,7 +323,7 @@ void ShelfLayoutManager::OnWindowActivated(aura::Window* active,
gfx::Rect ShelfLayoutManager::GetMaximizedWindowBounds(
aura::Window* window) {
- gfx::Rect bounds(ScreenAsh::GetDisplayParentBounds(window));
+ gfx::Rect bounds(ScreenAsh::GetDisplayBoundsInParent(window));
if (auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_DEFAULT ||
auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS) {
AdjustBoundsBasedOnAlignment(kAutoHideSize, &bounds);
@@ -335,7 +335,7 @@ gfx::Rect ShelfLayoutManager::GetMaximizedWindowBounds(
gfx::Rect ShelfLayoutManager::GetUnmaximizedWorkAreaBounds(
aura::Window* window) {
- gfx::Rect bounds(ScreenAsh::GetDisplayParentBounds(window));
+ gfx::Rect bounds(ScreenAsh::GetDisplayBoundsInParent(window));
int size;
if (auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS) {
size = kAutoHideSize;
@@ -415,7 +415,7 @@ void ShelfLayoutManager::StopAnimating() {
void ShelfLayoutManager::GetShelfSize(int* width, int* height) {
*width = *height = 0;
- gfx::Rect status_bounds(status_->GetWindowScreenBounds());
+ gfx::Rect status_bounds(status_->GetWindowBoundsInScreen());
gfx::Size launcher_size = launcher_ ?
launcher_widget()->GetContentsView()->GetPreferredSize() : gfx::Size();
if (alignment_ == SHELF_ALIGNMENT_BOTTOM)
@@ -444,7 +444,7 @@ void ShelfLayoutManager::CalculateTargetBounds(
TargetBounds* target_bounds) {
const gfx::Rect& available_bounds(
status_->GetNativeView()->GetRootWindow()->bounds());
- gfx::Rect status_bounds(status_->GetWindowScreenBounds());
+ gfx::Rect status_bounds(status_->GetWindowBoundsInScreen());
gfx::Size launcher_size = launcher_ ?
launcher_widget()->GetContentsView()->GetPreferredSize() : gfx::Size();
int shelf_size = 0;
@@ -552,7 +552,7 @@ ShelfLayoutManager::AutoHideState ShelfLayoutManager::CalculateAutoHideState(
aura::RootWindow* root = launcher_widget()->GetNativeView()->GetRootWindow();
bool mouse_over_launcher =
- launcher_widget()->GetWindowScreenBounds().Contains(
+ launcher_widget()->GetWindowBoundsInScreen().Contains(
root->last_mouse_location());
return mouse_over_launcher ? AUTO_HIDE_SHOWN : AUTO_HIDE_HIDDEN;
}
« no previous file with comments | « ash/wm/panel_layout_manager_unittest.cc ('k') | ash/wm/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698