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

Side by Side Diff: ash/wm/overview/window_selector_item.cc

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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/wm/overview/window_selector_item.h ('k') | ash/wm/overview/window_selector_panels.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/wm/overview/window_selector_item.h" 5 #include "ash/wm/overview/window_selector_item.h"
6 #include "base/auto_reset.h" 6 #include "base/auto_reset.h"
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 8
9 namespace ash { 9 namespace ash {
10 10
11 WindowSelectorItem::WindowSelectorItem() 11 WindowSelectorItem::WindowSelectorItem()
12 : root_window_(NULL), 12 : root_window_(NULL),
13 in_bounds_update_(false) { 13 in_bounds_update_(false) {
14 } 14 }
15 15
16 WindowSelectorItem::~WindowSelectorItem() { 16 WindowSelectorItem::~WindowSelectorItem() {
17 } 17 }
18 18
19 void WindowSelectorItem::SetBounds(aura::RootWindow* root_window, 19 void WindowSelectorItem::SetBounds(aura::Window* root_window,
20 const gfx::Rect& target_bounds) { 20 const gfx::Rect& target_bounds) {
21 if (in_bounds_update_) 21 if (in_bounds_update_)
22 return; 22 return;
23 base::AutoReset<bool> auto_reset_in_bounds_update(&in_bounds_update_, true); 23 base::AutoReset<bool> auto_reset_in_bounds_update(&in_bounds_update_, true);
24 root_window_ = root_window; 24 root_window_ = root_window;
25 target_bounds_ = target_bounds; 25 target_bounds_ = target_bounds;
26 SetItemBounds(root_window, target_bounds, true); 26 SetItemBounds(root_window, target_bounds, true);
27 } 27 }
28 28
29 void WindowSelectorItem::RecomputeWindowTransforms() { 29 void WindowSelectorItem::RecomputeWindowTransforms() {
30 if (in_bounds_update_ || target_bounds_.IsEmpty()) 30 if (in_bounds_update_ || target_bounds_.IsEmpty())
31 return; 31 return;
32 DCHECK(root_window_); 32 DCHECK(root_window_);
33 base::AutoReset<bool> auto_reset_in_bounds_update(&in_bounds_update_, true); 33 base::AutoReset<bool> auto_reset_in_bounds_update(&in_bounds_update_, true);
34 SetItemBounds(root_window_, target_bounds_, false); 34 SetItemBounds(root_window_, target_bounds_, false);
35 } 35 }
36 36
37 } // namespace ash 37 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector_item.h ('k') | ash/wm/overview/window_selector_panels.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698