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

Side by Side Diff: services/window_manager/basic_focus_rules.h

Issue 788453002: Put code in //services/window_manager in namespace window_manager (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « examples/wm_flow/wm/wm.cc ('k') | services/window_manager/basic_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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 SERVICES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_ 5 #ifndef SERVICES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_
6 #define SERVICES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_ 6 #define SERVICES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_
7 7
8 #include "services/window_manager/focus_rules.h" 8 #include "services/window_manager/focus_rules.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 class View;
12 }
11 13
12 class View; 14 namespace window_manager {
13 15
14 // The focusing rules used inside a window manager. 16 // The focusing rules used inside a window manager.
15 // 17 //
16 // This is intended to be a user supplyable, subclassable component passed to 18 // This is intended to be a user supplyable, subclassable component passed to
17 // WindowManagerApp, allowing for the creation of other window managers. 19 // WindowManagerApp, allowing for the creation of other window managers.
18 class BasicFocusRules : public FocusRules { 20 class BasicFocusRules : public FocusRules {
19 public: 21 public:
20 BasicFocusRules(mojo::View* window_container); 22 BasicFocusRules(mojo::View* window_container);
21 ~BasicFocusRules() override; 23 ~BasicFocusRules() override;
22 24
23 protected: 25 protected:
24 // Overridden from mojo::FocusRules: 26 // Overridden from mojo::FocusRules:
25 bool SupportsChildActivation(mojo::View* view) const override; 27 bool SupportsChildActivation(mojo::View* view) const override;
26 bool IsToplevelView(mojo::View* view) const override; 28 bool IsToplevelView(mojo::View* view) const override;
27 bool CanActivateView(mojo::View* view) const override; 29 bool CanActivateView(mojo::View* view) const override;
28 bool CanFocusView(mojo::View* view) const override; 30 bool CanFocusView(mojo::View* view) const override;
29 mojo::View* GetToplevelView(mojo::View* view) const override; 31 mojo::View* GetToplevelView(mojo::View* view) const override;
30 mojo::View* GetActivatableView(mojo::View* view) const override; 32 mojo::View* GetActivatableView(mojo::View* view) const override;
31 mojo::View* GetFocusableView(mojo::View* view) const override; 33 mojo::View* GetFocusableView(mojo::View* view) const override;
32 mojo::View* GetNextActivatableView(mojo::View* activatable) const override; 34 mojo::View* GetNextActivatableView(mojo::View* activatable) const override;
33 35
34 private: 36 private:
35 bool CanFocusViewImpl(View* view) const; 37 bool CanFocusViewImpl(mojo::View* view) const;
36 38
37 // Tests to see if |view| is in |window_container_|. 39 // Tests to see if |view| is in |window_container_|.
38 bool IsViewParentedToWindowContainer(View* view) const; 40 bool IsViewParentedToWindowContainer(mojo::View* view) const;
39 41
40 mojo::View* window_container_; 42 mojo::View* window_container_;
41 43
42 DISALLOW_COPY_AND_ASSIGN(BasicFocusRules); 44 DISALLOW_COPY_AND_ASSIGN(BasicFocusRules);
43 }; 45 };
44 46
45 } // namespace mojo 47 } // namespace window_manager
46 48
47 #endif // SERVICES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_ 49 #endif // SERVICES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_
OLDNEW
« no previous file with comments | « examples/wm_flow/wm/wm.cc ('k') | services/window_manager/basic_focus_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698