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

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: fix compile 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
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.
James Cook 2016/08/19 00:37:14 nice docs
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 coordiantes.
James Cook 2016/08/19 00:37:14 nit: coordinates
sky 2016/08/19 03:30:47 My vision is SO GOING DOWNHILL!
47 virtual gfx::Rect GetDisplayBoundsInScreen(views::Widget* widget) = 0;
48
49 virtual void AddPointerWatcher(views::PointerWatcher* watcher,
James Cook 2016/08/19 00:37:14 nit: "// See WmShell::AddPointerWatcher for detail
sky 2016/08/19 03:30:47 Done.
50 bool wants_moves) = 0;
51 virtual void RemovePointerWatcher(views::PointerWatcher* watcher) = 0;
52
53 // Returns true if any window has capture.
54 virtual bool DoesAnyWindowHaveCapture() = 0;
55
56 // See WmShell::IsMouseEventsEnabled() for details.
57 virtual bool IsMouseEventsEnabled() = 0;
58
59 protected:
60 ImmersiveContext();
61 virtual ~ImmersiveContext();
62
63 private:
64 static ImmersiveContext* instance_;
65 };
66
67 } // namespace ash
68
69 #endif // ASH_SHARED_IMMERSIVE_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698