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

Side by Side Diff: ash/wm/ash_focus_rules.cc

Issue 11421194: Hook up the FocusController behind a flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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 | « ash/wm/app_list_controller.cc ('k') | ash/wm/panel_layout_manager.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 "ash/wm/ash_focus_rules.h" 5 #include "ash/wm/ash_focus_rules.h"
6 6
7 #include "ui/aura/window.h" 7 #include "ui/aura/window.h"
8 8
9 namespace ash { 9 namespace ash {
10 namespace wm { 10 namespace wm {
11 11
12 //////////////////////////////////////////////////////////////////////////////// 12 ////////////////////////////////////////////////////////////////////////////////
13 // AshFocusRules, public: 13 // AshFocusRules, public:
14 14
15 AshFocusRules::AshFocusRules() { 15 AshFocusRules::AshFocusRules() {
16 } 16 }
17 17
18 AshFocusRules::~AshFocusRules() { 18 AshFocusRules::~AshFocusRules() {
19 } 19 }
20 20
21 //////////////////////////////////////////////////////////////////////////////// 21 ////////////////////////////////////////////////////////////////////////////////
22 // AshFocusRules, views::corewm::FocusRules: 22 // AshFocusRules, views::corewm::FocusRules:
23 23
24 bool AshFocusRules::CanActivateWindow(aura::Window* window) { 24 bool AshFocusRules::CanActivateWindow(aura::Window* window) {
25 return !!window->parent(); 25 return window && !!window->parent();
26 } 26 }
27 27
28 bool AshFocusRules::CanFocusWindow(aura::Window* window) { 28 bool AshFocusRules::CanFocusWindow(aura::Window* window) {
29 aura::Window* activatable = GetActivatableWindow(window); 29 aura::Window* activatable = GetActivatableWindow(window);
30 return activatable->Contains(window) && window->CanFocus(); 30 return activatable->Contains(window) && window->CanFocus();
31 } 31 }
32 32
33 aura::Window* AshFocusRules::GetActivatableWindow(aura::Window* window) { 33 aura::Window* AshFocusRules::GetActivatableWindow(aura::Window* window) {
34 return window; 34 return window;
35 } 35 }
36 36
37 aura::Window* AshFocusRules::GetFocusableWindow(aura::Window* window) { 37 aura::Window* AshFocusRules::GetFocusableWindow(aura::Window* window) {
38 return window; 38 return window;
39 } 39 }
40 40
41 aura::Window* AshFocusRules::GetNextActivatableWindow(aura::Window* ignore) { 41 aura::Window* AshFocusRules::GetNextActivatableWindow(aura::Window* ignore) {
42 return NULL; 42 return NULL;
43 } 43 }
44 44
45 aura::Window* AshFocusRules::GetNextFocusableWindow(aura::Window* ignore) { 45 aura::Window* AshFocusRules::GetNextFocusableWindow(aura::Window* ignore) {
46 return GetFocusableWindow(ignore->parent()); 46 return GetFocusableWindow(ignore->parent());
47 } 47 }
48 48
49 } // namespace wm 49 } // namespace wm
50 } // namespace ash 50 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/app_list_controller.cc ('k') | ash/wm/panel_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698