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

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

Issue 23529006: Move event handler to window_selector to ensure correct lifetime. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment Created 7 years, 3 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/wm/overview/window_selector_controller.cc ('k') | no next file » | 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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 #include "ash/screen_ash.h" 6 #include "ash/screen_ash.h"
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ash/test/shell_test_api.h" 9 #include "ash/test/shell_test_api.h"
10 #include "ash/wm/mru_window_tracker.h" 10 #include "ash/wm/mru_window_tracker.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 void ToggleOverview() { 47 void ToggleOverview() {
48 ash::Shell::GetInstance()->window_selector_controller()->ToggleOverview(); 48 ash::Shell::GetInstance()->window_selector_controller()->ToggleOverview();
49 } 49 }
50 50
51 void Cycle(WindowSelector::Direction direction) { 51 void Cycle(WindowSelector::Direction direction) {
52 ash::Shell::GetInstance()->window_selector_controller()-> 52 ash::Shell::GetInstance()->window_selector_controller()->
53 HandleCycleWindow(direction); 53 HandleCycleWindow(direction);
54 } 54 }
55 55
56 void StopCycling() { 56 void StopCycling() {
57 ash::Shell::GetInstance()->window_selector_controller()->AltKeyReleased(); 57 ash::Shell::GetInstance()->window_selector_controller()->window_selector_->
58 SelectWindow();
58 } 59 }
59 60
60 void FireOverviewStartTimer() { 61 void FireOverviewStartTimer() {
61 // Calls the method to start overview mode which is normally called by the 62 // Calls the method to start overview mode which is normally called by the
62 // timer. The timer will still fire and call this method triggering the 63 // timer. The timer will still fire and call this method triggering the
63 // DCHECK that overview mode was not already started, except that we call 64 // DCHECK that overview mode was not already started, except that we call
64 // StopCycling before the timer has a chance to fire. 65 // StopCycling before the timer has a chance to fire.
65 ash::Shell::GetInstance()->window_selector_controller()->window_selector_-> 66 ash::Shell::GetInstance()->window_selector_controller()->window_selector_->
66 StartOverview(); 67 StartOverview();
67 } 68 }
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 root_windows[0]->bounds().Contains( 280 root_windows[0]->bounds().Contains(
280 ToEnclosingRect(GetTransformedBounds(window2.get()))); 281 ToEnclosingRect(GetTransformedBounds(window2.get())));
281 root_windows[1]->bounds().Contains( 282 root_windows[1]->bounds().Contains(
282 ToEnclosingRect(GetTransformedBounds(window3.get()))); 283 ToEnclosingRect(GetTransformedBounds(window3.get())));
283 root_windows[1]->bounds().Contains( 284 root_windows[1]->bounds().Contains(
284 ToEnclosingRect(GetTransformedBounds(window4.get()))); 285 ToEnclosingRect(GetTransformedBounds(window4.get())));
285 } 286 }
286 287
287 } // namespace internal 288 } // namespace internal
288 } // namespace ash 289 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/overview/window_selector_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698