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

Side by Side Diff: ui/aura/desktop/desktop_activation_client.cc

Issue 10827145: Convert Aura to use ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « ui/aura/desktop/desktop_activation_client.h ('k') | ui/aura/event.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 "ui/aura/desktop/desktop_activation_client.h" 5 #include "ui/aura/desktop/desktop_activation_client.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ui/aura/client/activation_delegate.h" 9 #include "ui/aura/client/activation_delegate.h"
10 #include "ui/aura/client/activation_change_observer.h" 10 #include "ui/aura/client/activation_change_observer.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void DesktopActivationClient::DeactivateWindow(Window* window) { 90 void DesktopActivationClient::DeactivateWindow(Window* window) {
91 if (window == current_active_) 91 if (window == current_active_)
92 current_active_ = NULL; 92 current_active_ = NULL;
93 } 93 }
94 94
95 Window* DesktopActivationClient::GetActiveWindow() { 95 Window* DesktopActivationClient::GetActiveWindow() {
96 return current_active_; 96 return current_active_;
97 } 97 }
98 98
99 bool DesktopActivationClient::OnWillFocusWindow(Window* window, 99 bool DesktopActivationClient::OnWillFocusWindow(Window* window,
100 const Event* event) { 100 const ui::Event* event) {
101 return CanActivateWindow(GetActivatableWindow(window)); 101 return CanActivateWindow(GetActivatableWindow(window));
102 } 102 }
103 103
104 void DesktopActivationClient::OnWindowDestroying(aura::Window* window) { 104 void DesktopActivationClient::OnWindowDestroying(aura::Window* window) {
105 if (current_active_ == window) { 105 if (current_active_ == window) {
106 current_active_ = NULL; 106 current_active_ = NULL;
107 FOR_EACH_OBSERVER(aura::client::ActivationChangeObserver, 107 FOR_EACH_OBSERVER(aura::client::ActivationChangeObserver,
108 observers_, 108 observers_,
109 OnWindowActivated(NULL, window)); 109 OnWindowActivated(NULL, window));
110 110
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // that path instead. 144 // that path instead.
145 if (child->transient_parent()) 145 if (child->transient_parent())
146 return GetActivatableWindow(child->transient_parent()); 146 return GetActivatableWindow(child->transient_parent());
147 parent = parent->parent(); 147 parent = parent->parent();
148 child = child->parent(); 148 child = child->parent();
149 } 149 }
150 return NULL; 150 return NULL;
151 } 151 }
152 152
153 } // namespace aura 153 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/desktop/desktop_activation_client.h ('k') | ui/aura/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698