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

Side by Side Diff: ash/shelf/shelf.cc

Issue 2017413002: ash: Fix variable names and setters in ShelfLayoutManager and tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shellshelf
Patch Set: review comments 3 Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « ash/shelf/shelf.h ('k') | ash/shelf/shelf_layout_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shelf/shelf.h" 5 #include "ash/shelf/shelf.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "ash/common/wm/shelf/wm_shelf_util.h" 10 #include "ash/common/wm/shelf/wm_shelf_util.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void Shelf::SetAutoHideBehavior(ShelfAutoHideBehavior auto_hide_behavior) { 98 void Shelf::SetAutoHideBehavior(ShelfAutoHideBehavior auto_hide_behavior) {
99 if (auto_hide_behavior_ == auto_hide_behavior) 99 if (auto_hide_behavior_ == auto_hide_behavior)
100 return; 100 return;
101 101
102 auto_hide_behavior_ = auto_hide_behavior; 102 auto_hide_behavior_ = auto_hide_behavior;
103 delegate_->OnShelfAutoHideBehaviorChanged(this); 103 delegate_->OnShelfAutoHideBehaviorChanged(this);
104 Shell::GetInstance()->OnShelfAutoHideBehaviorChanged( 104 Shell::GetInstance()->OnShelfAutoHideBehaviorChanged(
105 shelf_widget_->GetNativeWindow()->GetRootWindow()); 105 shelf_widget_->GetNativeWindow()->GetRootWindow());
106 } 106 }
107 107
108 ShelfAutoHideState Shelf::GetAutoHideState() const {
109 return shelf_widget_->shelf_layout_manager()->auto_hide_state();
110 }
111
112 ShelfVisibilityState Shelf::GetVisibilityState() const {
113 return shelf_widget_->shelf_layout_manager()->visibility_state();
114 }
115
108 gfx::Rect Shelf::GetScreenBoundsOfItemIconForWindow( 116 gfx::Rect Shelf::GetScreenBoundsOfItemIconForWindow(
109 const aura::Window* window) { 117 const aura::Window* window) {
110 ShelfID id = GetShelfIDForWindow(window); 118 ShelfID id = GetShelfIDForWindow(window);
111 gfx::Rect bounds(shelf_view_->GetIdealBoundsOfItemIcon(id)); 119 gfx::Rect bounds(shelf_view_->GetIdealBoundsOfItemIcon(id));
112 gfx::Point screen_origin; 120 gfx::Point screen_origin;
113 views::View::ConvertPointToScreen(shelf_view_, &screen_origin); 121 views::View::ConvertPointToScreen(shelf_view_, &screen_origin);
114 return gfx::Rect(screen_origin.x() + bounds.x(), 122 return gfx::Rect(screen_origin.x() + bounds.x(),
115 screen_origin.y() + bounds.y(), 123 screen_origin.y() + bounds.y(),
116 bounds.width(), 124 bounds.width(),
117 bounds.height()); 125 bounds.height());
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 213
206 gfx::Rect Shelf::GetVisibleItemsBoundsInScreen() const { 214 gfx::Rect Shelf::GetVisibleItemsBoundsInScreen() const {
207 return shelf_view_->GetVisibleItemsBoundsInScreen(); 215 return shelf_view_->GetVisibleItemsBoundsInScreen();
208 } 216 }
209 217
210 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() { 218 app_list::ApplicationDragAndDropHost* Shelf::GetDragAndDropHostForAppList() {
211 return shelf_view_; 219 return shelf_view_;
212 } 220 }
213 221
214 } // namespace ash 222 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf.h ('k') | ash/shelf/shelf_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698