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

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

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 8 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 | « 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 SERVICES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_
6 #define SERVICES_WINDOW_MANAGER_BASIC_FOCUS_RULES_H_
7
8 #include "mojo/services/window_manager/focus_rules.h"
9
10 namespace mojo {
11 class View;
12 }
13
14 namespace window_manager {
15
16 // The focusing rules used inside a window manager.
17 //
18 // This is intended to be a user supplyable, subclassable component passed to
19 // WindowManagerApp, allowing for the creation of other window managers.
20 class BasicFocusRules : public FocusRules {
21 public:
22 BasicFocusRules(mojo::View* window_container);
23 ~BasicFocusRules() override;
24
25 protected:
26 // Overridden from mojo::FocusRules:
27 bool SupportsChildActivation(mojo::View* view) const override;
28 bool IsToplevelView(mojo::View* view) const override;
29 bool CanActivateView(mojo::View* view) const override;
30 bool CanFocusView(mojo::View* view) const override;
31 mojo::View* GetToplevelView(mojo::View* view) const override;
32 mojo::View* GetActivatableView(mojo::View* view) const override;
33 mojo::View* GetFocusableView(mojo::View* view) const override;
34 mojo::View* GetNextActivatableView(mojo::View* activatable) const override;
35
36 private:
37 bool CanFocusViewImpl(mojo::View* view) const;
38
39 // Tests to see if |view| is in |window_container_|.
40 bool IsViewParentedToWindowContainer(mojo::View* view) const;
41
42 mojo::View* window_container_;
43
44 DISALLOW_COPY_AND_ASSIGN(BasicFocusRules);
45 };
46
47 } // namespace window_manager
48
49 #endif // SERVICES_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