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

Side by Side Diff: ash/wm/app_list_controller.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/tooltips/tooltip_controller.cc ('k') | ash/wm/base_layout_manager.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/wm/app_list_controller.h" 5 #include "ash/wm/app_list_controller.h"
6 6
7 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 base::TimeDelta::FromMilliseconds(kAnimationDurationMs)); 195 base::TimeDelta::FromMilliseconds(kAnimationDurationMs));
196 animation.AddObserver(this); 196 animation.AddObserver(this);
197 197
198 layer->SetOpacity(is_visible_ ? 1.0 : 0.0); 198 layer->SetOpacity(is_visible_ ? 1.0 : 0.0);
199 layer->SetBounds(target_bounds); 199 layer->SetBounds(target_bounds);
200 } 200 }
201 201
202 void AppListController::ProcessLocatedEvent(const aura::LocatedEvent& event) { 202 void AppListController::ProcessLocatedEvent(const aura::LocatedEvent& event) {
203 if (view_ && is_visible_) { 203 if (view_ && is_visible_) {
204 views::Widget* widget = view_->GetWidget(); 204 views::Widget* widget = view_->GetWidget();
205 if (!widget->GetNativeView()->GetRootWindowBounds().Contains( 205 if (!widget->GetNativeView()->GetBoundsInRootWindow().Contains(
206 event.root_location())) { 206 event.root_location())) {
207 SetVisible(false); 207 SetVisible(false);
208 } 208 }
209 } 209 }
210 } 210 }
211 211
212 void AppListController::UpdateBounds() { 212 void AppListController::UpdateBounds() {
213 if (view_ && is_visible_) 213 if (view_ && is_visible_)
214 view_->UpdateBounds(); 214 view_->UpdateBounds();
215 } 215 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 291
292 //////////////////////////////////////////////////////////////////////////////// 292 ////////////////////////////////////////////////////////////////////////////////
293 // AppListController, LauncherIconObserver implementation: 293 // AppListController, LauncherIconObserver implementation:
294 294
295 void AppListController::OnLauncherIconPositionsChanged() { 295 void AppListController::OnLauncherIconPositionsChanged() {
296 UpdateBounds(); 296 UpdateBounds();
297 } 297 }
298 298
299 } // namespace internal 299 } // namespace internal
300 } // namespace ash 300 } // namespace ash
OLDNEW
« no previous file with comments | « ash/tooltips/tooltip_controller.cc ('k') | ash/wm/base_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698