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

Side by Side Diff: ash/wm/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.h ('k') | ash/wm/ash_activation_controller.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/activation_controller.h" 5 #include "ash/wm/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/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/activation_controller_delegate.h" 10 #include "ash/wm/activation_controller_delegate.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 void ActivationController::DeactivateWindow(aura::Window* window) { 204 void ActivationController::DeactivateWindow(aura::Window* window) {
205 if (window) 205 if (window)
206 ActivateNextWindow(window); 206 ActivateNextWindow(window);
207 } 207 }
208 208
209 aura::Window* ActivationController::GetActiveWindow() { 209 aura::Window* ActivationController::GetActiveWindow() {
210 return active_window_; 210 return active_window_;
211 } 211 }
212 212
213 aura::Window* ActivationController::GetActivatableWindow(aura::Window* window) {
214 return GetActivatableWindow(window, NULL);
215 }
216
213 bool ActivationController::OnWillFocusWindow(aura::Window* window, 217 bool ActivationController::OnWillFocusWindow(aura::Window* window,
214 const ui::Event* event) { 218 const ui::Event* event) {
215 return CanActivateWindowWithEvent( 219 return CanActivateWindowWithEvent(
216 GetActivatableWindow(window, event), event, CURRENT_VISIBILITY); 220 GetActivatableWindow(window, event), event, CURRENT_VISIBILITY);
217 } 221 }
218 222
219 //////////////////////////////////////////////////////////////////////////////// 223 ////////////////////////////////////////////////////////////////////////////////
220 // ActivationController, aura::WindowObserver implementation: 224 // ActivationController, aura::WindowObserver implementation:
221 225
222 void ActivationController::OnWindowVisibilityChanged(aura::Window* window, 226 void ActivationController::OnWindowVisibilityChanged(aura::Window* window,
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 aura::Window* window = static_cast<aura::Window*>(event->target()); 421 aura::Window* window = static_cast<aura::Window*>(event->target());
418 window = delegate_->WillFocusWindow(window); 422 window = delegate_->WillFocusWindow(window);
419 if (GetActiveWindow() != window) { 423 if (GetActiveWindow() != window) {
420 aura::client::GetFocusClient(window)->FocusWindow( 424 aura::client::GetFocusClient(window)->FocusWindow(
421 FindFocusableWindowFor(window), event); 425 FindFocusableWindowFor(window), event);
422 } 426 }
423 } 427 }
424 428
425 } // namespace internal 429 } // namespace internal
426 } // namespace ash 430 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/activation_controller.h ('k') | ash/wm/ash_activation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698