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

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

Issue 765753003: Move window_manager service implementation to //services (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 | « mojo/services/window_manager/DEPS ('k') | mojo/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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MOJO_SERIVCES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_
6 #define MOJO_SERIVCES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_
7
8 #include "mojo/services/window_manager/focus_rules.h"
9
10 namespace mojo {
11
12 class View;
13
14 // The focusing rules used inside a window manager.
15 //
16 // This is intended to be a user supplyable, subclassable component passed to
17 // WindowManagerApp, allowing for the creation of other window managers.
18 //
19 // TODO(erg): This was a straight move of the minimal focus rules from when
20 // WindowManagerApp directly used the wm::FocusController. This implementation
21 // is very incomplete. crbug.com/431047
22 class BasicFocusRules : public FocusRules {
23 public:
24 BasicFocusRules(mojo::View* window_container);
25 ~BasicFocusRules() override;
26
27 protected:
28 // Overridden from mojo::FocusRules:
29 bool IsToplevelView(mojo::View* view) const override;
30 bool CanActivateView(mojo::View* view) const override;
31 bool CanFocusView(mojo::View* view) const override;
32 mojo::View* GetToplevelView(mojo::View* view) const override;
33 mojo::View* GetActivatableView(mojo::View* view) const override;
34 mojo::View* GetFocusableView(mojo::View* view) const override;
35 mojo::View* GetNextActivatableView(mojo::View* activatable) const override;
36
37 private:
38 mojo::View* window_container_;
39
40 DISALLOW_COPY_AND_ASSIGN(BasicFocusRules);
41 };
42
43 } // namespace mojo
44
45 #endif // MOJO_SERIVCES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_
OLDNEW
« no previous file with comments | « mojo/services/window_manager/DEPS ('k') | mojo/services/window_manager/basic_focus_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698