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

Side by Side Diff: ash/wm/ash_activation_controller.cc

Issue 11418224: Eliminates all ash dependencies from WindowModalityController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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/activation_controller.cc ('k') | ash/wm/window_modality_controller.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 (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/ash_activation_controller.h" 5 #include "ash/wm/ash_activation_controller.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/wm/activation_controller.h" 9 #include "ash/wm/activation_controller.h"
10 #include "ash/wm/property_util.h" 10 #include "ash/wm/property_util.h"
(...skipping 11 matching lines...) Expand all
22 } 22 }
23 23
24 AshActivationController::~AshActivationController() { 24 AshActivationController::~AshActivationController() {
25 } 25 }
26 26
27 //////////////////////////////////////////////////////////////////////////////// 27 ////////////////////////////////////////////////////////////////////////////////
28 // AshActivationController, ActivationControllerDelegate implementation: 28 // AshActivationController, ActivationControllerDelegate implementation:
29 29
30 aura::Window* AshActivationController::WillActivateWindow( 30 aura::Window* AshActivationController::WillActivateWindow(
31 aura::Window* window) { 31 aura::Window* window) {
32 aura::Window* window_modal_transient = wm::GetModalTransient(window); 32 aura::Window* window_modal_transient = GetModalTransient(window);
33 if (window_modal_transient) 33 if (window_modal_transient)
34 return window_modal_transient; 34 return window_modal_transient;
35 35
36 // Make sure the workspace manager switches to the workspace for window. 36 // Make sure the workspace manager switches to the workspace for window.
37 // Without this CanReceiveEvents() below returns false and activation never 37 // Without this CanReceiveEvents() below returns false and activation never
38 // changes. CanReceiveEvents() returns false if |window| isn't in the active 38 // changes. CanReceiveEvents() returns false if |window| isn't in the active
39 // workspace, in which case its parent is not visible. 39 // workspace, in which case its parent is not visible.
40 // TODO(sky): if I instead change the opacity of the parent this isn't an 40 // TODO(sky): if I instead change the opacity of the parent this isn't an
41 // issue, but will make animations trickier... Consider which one is better. 41 // issue, but will make animations trickier... Consider which one is better.
42 if (window) { 42 if (window) {
(...skipping 19 matching lines...) Expand all
62 // Shell. 62 // Shell.
63 if (window) { 63 if (window) {
64 DCHECK(window->GetRootWindow()); 64 DCHECK(window->GetRootWindow());
65 Shell::GetInstance()->set_active_root_window(window->GetRootWindow()); 65 Shell::GetInstance()->set_active_root_window(window->GetRootWindow());
66 } 66 }
67 return window; 67 return window;
68 } 68 }
69 69
70 aura::Window* AshActivationController::WillFocusWindow( 70 aura::Window* AshActivationController::WillFocusWindow(
71 aura::Window* window) { 71 aura::Window* window) {
72 aura::Window* window_modal_transient = wm::GetModalTransient(window); 72 aura::Window* window_modal_transient = GetModalTransient(window);
73 if (window_modal_transient) 73 if (window_modal_transient)
74 return window_modal_transient; 74 return window_modal_transient;
75 return window; 75 return window;
76 } 76 }
77 77
78 } // namespace internal 78 } // namespace internal
79 } // namespace ash 79 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/activation_controller.cc ('k') | ash/wm/window_modality_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698