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

Side by Side Diff: ui/views/corewm/base_focus_rules.h

Issue 11414304: Fleshes out the basic set of focus rules a bit more. (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/ash_focus_rules.cc ('k') | ui/views/corewm/base_focus_rules.cc » ('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 #ifndef UI_VIEWS_COREWM_BASE_FOCUS_RULES_H_ 5 #ifndef UI_VIEWS_COREWM_BASE_FOCUS_RULES_H_
6 #define UI_VIEWS_COREWM_BASE_FOCUS_RULES_H_ 6 #define UI_VIEWS_COREWM_BASE_FOCUS_RULES_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/views/corewm/focus_rules.h" 10 #include "ui/views/corewm/focus_rules.h"
11 11
12 namespace views { 12 namespace views {
13 namespace corewm { 13 namespace corewm {
14 14
15 // A set of basic focus and activation rules. Specializations should most likely 15 // A set of basic focus and activation rules. Specializations should most likely
16 // subclass this and call up to these methods rather than reimplementing them. 16 // subclass this and call up to these methods rather than reimplementing them.
17 class VIEWS_EXPORT BaseFocusRules : public FocusRules { 17 class VIEWS_EXPORT BaseFocusRules : public FocusRules {
18 public: 18 protected:
19 BaseFocusRules(); 19 BaseFocusRules();
20 virtual ~BaseFocusRules(); 20 virtual ~BaseFocusRules();
21 21
22 protected: 22 // Returns true if the children of |window| can be activated.
23 virtual bool SupportsChildActivation(aura::Window* window) = 0;
24
25 // Returns true if |window| is considered visible for activation purposes.
26 virtual bool IsWindowConsideredVisibleForActivation(aura::Window* window);
27
23 // Overridden from FocusRules: 28 // Overridden from FocusRules:
24 virtual bool CanActivateWindow(aura::Window* window) OVERRIDE; 29 virtual bool CanActivateWindow(aura::Window* window) OVERRIDE;
25 virtual bool CanFocusWindow(aura::Window* window) OVERRIDE; 30 virtual bool CanFocusWindow(aura::Window* window) OVERRIDE;
26 virtual aura::Window* GetActivatableWindow(aura::Window* window) OVERRIDE; 31 virtual aura::Window* GetActivatableWindow(aura::Window* window) OVERRIDE;
27 virtual aura::Window* GetFocusableWindow(aura::Window* window) OVERRIDE; 32 virtual aura::Window* GetFocusableWindow(aura::Window* window) OVERRIDE;
28 virtual aura::Window* GetNextActivatableWindow(aura::Window* ignore) OVERRIDE; 33 virtual aura::Window* GetNextActivatableWindow(aura::Window* ignore) OVERRIDE;
29 virtual aura::Window* GetNextFocusableWindow(aura::Window* ignore) OVERRIDE; 34 virtual aura::Window* GetNextFocusableWindow(aura::Window* ignore) OVERRIDE;
30 35
31 private: 36 private:
32 DISALLOW_COPY_AND_ASSIGN(BaseFocusRules); 37 DISALLOW_COPY_AND_ASSIGN(BaseFocusRules);
33 }; 38 };
34 39
35 } // namespace corewm 40 } // namespace corewm
36 } // namespace views 41 } // namespace views
37 42
38 #endif // UI_VIEWS_COREWM_BASE_FOCUS_RULES_H_ 43 #endif // UI_VIEWS_COREWM_BASE_FOCUS_RULES_H_
OLDNEW
« no previous file with comments | « ash/wm/ash_focus_rules.cc ('k') | ui/views/corewm/base_focus_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698