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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
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/views/widget/desktop_aura/desktop_focus_rules.h" 5 #include "ui/views/widget/desktop_aura/desktop_focus_rules.h"
6 6
7 #include "ui/aura/root_window.h" 7 #include "ui/aura/root_window.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 9
10 namespace views { 10 namespace views {
11 11
12 DesktopFocusRules::DesktopFocusRules() {} 12 DesktopFocusRules::DesktopFocusRules(aura::Window* content_window)
13 : content_window_(content_window) {}
14
13 DesktopFocusRules::~DesktopFocusRules() {} 15 DesktopFocusRules::~DesktopFocusRules() {}
14 16
15 bool DesktopFocusRules::SupportsChildActivation(aura::Window* window) const { 17 bool DesktopFocusRules::SupportsChildActivation(aura::Window* window) const {
16 // In Desktop-Aura, only children of the RootWindow are activatable. 18 // In Desktop-Aura, only the content_window or children of the RootWindow are
17 return window->GetRootWindow() == window; 19 // activatable.
20 return window == content_window_->parent() ||
21 window->GetRootWindow() == window;
18 } 22 }
19 23
20 } // namespace views 24 } // namespace views
OLDNEW
« 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