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

Unified Diff: ui/views/widget/desktop_aura/desktop_activation_client.cc

Issue 11418224: Eliminates all ash dependencies from WindowModalityController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_activation_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_aura/desktop_activation_client.cc
===================================================================
--- ui/views/widget/desktop_aura/desktop_activation_client.cc (revision 170295)
+++ ui/views/widget/desktop_aura/desktop_activation_client.cc (working copy)
@@ -100,6 +100,23 @@
return current_active_;
}
+aura::Window* DesktopActivationClient::GetActivatableWindow(
+ aura::Window* window) {
+ aura::Window* parent = window->parent();
+ aura::Window* child = window;
+ while (parent) {
+ if (CanActivateWindow(child))
+ return child;
+ // If |child| isn't activatable, but has transient parent, trace
+ // that path instead.
+ if (child->transient_parent())
+ return GetActivatableWindow(child->transient_parent());
+ parent = parent->parent();
+ child = child->parent();
+ }
+ return NULL;
+}
+
bool DesktopActivationClient::OnWillFocusWindow(aura::Window* window,
const ui::Event* event) {
return CanActivateWindow(GetActivatableWindow(window));
@@ -156,23 +173,6 @@
return ui::ER_UNHANDLED;
}
-aura::Window* DesktopActivationClient::GetActivatableWindow(
- aura::Window* window) {
- aura::Window* parent = window->parent();
- aura::Window* child = window;
- while (parent) {
- if (CanActivateWindow(child))
- return child;
- // If |child| isn't activatable, but has transient parent, trace
- // that path instead.
- if (child->transient_parent())
- return GetActivatableWindow(child->transient_parent());
- parent = parent->parent();
- child = child->parent();
- }
- return NULL;
-}
-
void DesktopActivationClient::FocusWindowWithEvent(const ui::Event* event) {
aura::Window* window = static_cast<aura::Window*>(event->target());
if (GetActiveWindow() != window) {
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_activation_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698