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

Side by Side Diff: ui/wm/core/focus_controller.cc

Issue 2821213002: chromeos: converts ash devtools to aura::Window (Closed)
Patch Set: fix cast Created 3 years, 8 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
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 "ui/wm/core/focus_controller.h" 5 #include "ui/wm/core/focus_controller.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "ui/aura/client/aura_constants.h" 8 #include "ui/aura/client/aura_constants.h"
9 #include "ui/aura/client/capture_client.h" 9 #include "ui/aura/client/capture_client.h"
10 #include "ui/aura/client/focus_change_observer.h" 10 #include "ui/aura/client/focus_change_observer.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 void FocusController::ActivateWindow(aura::Window* window) { 66 void FocusController::ActivateWindow(aura::Window* window) {
67 FocusWindow(window); 67 FocusWindow(window);
68 } 68 }
69 69
70 void FocusController::DeactivateWindow(aura::Window* window) { 70 void FocusController::DeactivateWindow(aura::Window* window) {
71 if (window) 71 if (window)
72 FocusWindow(rules_->GetNextActivatableWindow(window)); 72 FocusWindow(rules_->GetNextActivatableWindow(window));
73 } 73 }
74 74
75 aura::Window* FocusController::GetActiveWindow() { 75 const aura::Window* FocusController::GetActiveWindow() const {
76 return active_window_; 76 return active_window_;
77 } 77 }
78 78
79 aura::Window* FocusController::GetActivatableWindow(aura::Window* window) { 79 aura::Window* FocusController::GetActivatableWindow(aura::Window* window) {
80 return rules_->GetActivatableWindow(window); 80 return rules_->GetActivatableWindow(window);
81 } 81 }
82 82
83 aura::Window* FocusController::GetToplevelWindow(aura::Window* window) { 83 aura::Window* FocusController::GetToplevelWindow(aura::Window* window) {
84 return rules_->GetToplevelWindow(window); 84 return rules_->GetToplevelWindow(window);
85 } 85 }
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 // FocusWindow() will focus the topmost window, which may not be the 352 // FocusWindow() will focus the topmost window, which may not be the
353 // currently focused one. 353 // currently focused one.
354 if (rules_->CanFocusWindow(GetToplevelWindow(window))) { 354 if (rules_->CanFocusWindow(GetToplevelWindow(window))) {
355 FocusAndActivateWindow( 355 FocusAndActivateWindow(
356 aura::client::ActivationChangeObserver::ActivationReason::INPUT_EVENT, 356 aura::client::ActivationChangeObserver::ActivationReason::INPUT_EVENT,
357 window); 357 window);
358 } 358 }
359 } 359 }
360 360
361 } // namespace wm 361 } // namespace wm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698