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

Side by Side Diff: ui/wm/core/base_focus_rules.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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
« no previous file with comments | « ui/wm/core/accelerator_filter.cc ('k') | ui/wm/core/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_WM_CORE_BASE_FOCUS_RULES_H_
6 #define UI_WM_CORE_BASE_FOCUS_RULES_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "ui/wm/core/focus_rules.h"
11
12 namespace wm {
13
14 // A set of basic focus and activation rules. Specializations should most likely
15 // subclass this and call up to these methods rather than reimplementing them.
16 class WM_EXPORT BaseFocusRules : public FocusRules {
17 protected:
18 BaseFocusRules();
19 virtual ~BaseFocusRules();
20
21 // Returns true if the children of |window| can be activated.
22 virtual bool SupportsChildActivation(aura::Window* window) const = 0;
23
24 // Returns true if |window| is considered visible for activation purposes.
25 virtual bool IsWindowConsideredVisibleForActivation(
26 aura::Window* window) const;
27
28 // Overridden from FocusRules:
29 virtual bool IsToplevelWindow(aura::Window* window) const override;
30 virtual bool CanActivateWindow(aura::Window* window) const override;
31 virtual bool CanFocusWindow(aura::Window* window) const override;
32 virtual aura::Window* GetToplevelWindow(aura::Window* window) const override;
33 virtual aura::Window* GetActivatableWindow(
34 aura::Window* window) const override;
35 virtual aura::Window* GetFocusableWindow(aura::Window* window) const override;
36 virtual aura::Window* GetNextActivatableWindow(
37 aura::Window* ignore) const override;
38
39 private:
40 DISALLOW_COPY_AND_ASSIGN(BaseFocusRules);
41 };
42
43 } // namespace wm
44
45 #endif // UI_WM_CORE_BASE_FOCUS_RULES_H_
OLDNEW
« no previous file with comments | « ui/wm/core/accelerator_filter.cc ('k') | ui/wm/core/base_focus_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698