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

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

Issue 23903056: Add a container window to host the desktop window hierarchy in AURA. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/desktop_focus_rules.cc
===================================================================
--- ui/views/widget/desktop_aura/desktop_focus_rules.cc (revision 224198)
+++ ui/views/widget/desktop_aura/desktop_focus_rules.cc (working copy)
@@ -9,12 +9,16 @@
namespace views {
-DesktopFocusRules::DesktopFocusRules() {}
+DesktopFocusRules::DesktopFocusRules(aura::Window* content_window)
+ : content_window_(content_window) {}
+
DesktopFocusRules::~DesktopFocusRules() {}
bool DesktopFocusRules::SupportsChildActivation(aura::Window* window) const {
- // In Desktop-Aura, only children of the RootWindow are activatable.
- return window->GetRootWindow() == window;
+ // In Desktop-Aura, only the content_window or children of the RootWindow are
+ // activatable.
+ return window == content_window_->parent() ||
+ window->GetRootWindow() == window;
}
} // namespace views
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_focus_rules.h ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698