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

Side by Side Diff: ash/shared/immersive_context.h

Issue 2260613002: Adds ImmersiveContext and ImmersiveHandlerFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 4 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 | « ash/shared/README.md ('k') | ash/shared/immersive_context.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 2016 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 ASH_SHARED_IMMERSIVE_CONTEXT_H_
6 #define ASH_SHARED_IMMERSIVE_CONTEXT_H_
7
8 #include "ash/ash_export.h"
9
10 namespace gfx {
11 class Rect;
12 }
13 namespace views {
14 class PointerWatcher;
15 class Widget;
16 }
17
18 namespace ash {
19
20 class ImmersiveFullscreenController;
21
22 // ImmersiveFullscreenController is used in four distinct environments: ash,
23 // mash, chrome in ash and chrome in mash. All of these have slightly different
24 // restrictions. ImmersiveContext enables ImmersiveFullscreenController to be
25 // used in these different environments. ImmersiveContext abstracts away all the
26 // windowing related calls so that ImmersiveFullscreenController does not
27 // depend upon aura, mus or ash.
28 //
29 // ImmersiveContext is a singleton.
30 class ASH_EXPORT ImmersiveContext {
31 public:
32 static ImmersiveContext* Get() { return instance_; }
33
34 // Mirrors that of WmShell::InstallResizeHandleWindowTargeter(), see it
35 // for details
36 virtual void InstallResizeHandleWindowTargeter(
37 ImmersiveFullscreenController* controller) = 0;
38
39 // Used to setup state necessary for entering or existing immersive mode. It
40 // is expected this interacts with the shelf, and installs any other necessary
41 // state.
42 virtual void OnEnteringOrExitingImmersive(
43 ImmersiveFullscreenController* controller,
44 bool entering) = 0;
45
46 // Returns the bounds of the display the widget is on, in screen coordinates.
47 virtual gfx::Rect GetDisplayBoundsInScreen(views::Widget* widget) = 0;
48
49 // See WmShell::AddPointerWatcher for details.
50 virtual void AddPointerWatcher(views::PointerWatcher* watcher,
51 bool wants_moves) = 0;
52 virtual void RemovePointerWatcher(views::PointerWatcher* watcher) = 0;
53
54 // Returns true if any window has capture.
55 virtual bool DoesAnyWindowHaveCapture() = 0;
56
57 // See WmShell::IsMouseEventsEnabled() for details.
58 virtual bool IsMouseEventsEnabled() = 0;
59
60 protected:
61 ImmersiveContext();
62 virtual ~ImmersiveContext();
63
64 private:
65 static ImmersiveContext* instance_;
66 };
67
68 } // namespace ash
69
70 #endif // ASH_SHARED_IMMERSIVE_CONTEXT_H_
OLDNEW
« no previous file with comments | « ash/shared/README.md ('k') | ash/shared/immersive_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698