OLD | NEW |
---|---|
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 #ifndef CHROME_BROWSER_UI_VIEWS_EXCLUSIVE_ACCESS_BUBBLE_VIEWS_CONTEXT_H_ | 4 #ifndef CHROME_BROWSER_UI_VIEWS_EXCLUSIVE_ACCESS_BUBBLE_VIEWS_CONTEXT_H_ |
5 #define CHROME_BROWSER_UI_VIEWS_EXCLUSIVE_ACCESS_BUBBLE_VIEWS_CONTEXT_H_ | 5 #define CHROME_BROWSER_UI_VIEWS_EXCLUSIVE_ACCESS_BUBBLE_VIEWS_CONTEXT_H_ |
6 | 6 |
7 #include "ui/base/accelerators/accelerator.h" | |
7 #include "ui/gfx/geometry/rect.h" | 8 #include "ui/gfx/geometry/rect.h" |
9 #include "ui/gfx/native_widget_types.h" | |
8 | 10 |
9 class ExclusiveAccessManager; | 11 class ExclusiveAccessManager; |
10 | 12 |
11 namespace views { | 13 namespace views { |
12 class Widget; | 14 class Widget; |
13 } | 15 } |
14 | 16 |
15 // Context in which the exclusive access bubble view is initiated. | 17 // Context in which the exclusive access bubble view is initiated. |
16 class ExclusiveAccessBubbleViewsContext { | 18 class ExclusiveAccessBubbleViewsContext : public ui::AcceleratorProvider { |
msw
2016/02/03 18:52:24
Eh, I'm on the fence about this; should this inter
tapted
2016/02/03 21:58:25
Ah, that's nicer. I started with something like Ge
| |
17 public: | 19 public: |
18 virtual ~ExclusiveAccessBubbleViewsContext() {} | |
19 | |
20 // Returns ExclusiveAccessManager controlling exclusive access for the given | 20 // Returns ExclusiveAccessManager controlling exclusive access for the given |
21 // webview. | 21 // webview. |
22 virtual ExclusiveAccessManager* GetExclusiveAccessManager() = 0; | 22 virtual ExclusiveAccessManager* GetExclusiveAccessManager() = 0; |
23 | 23 |
24 // Returns the Widget that hosts the view containing the exclusive access | 24 // Returns the Widget that hosts the view containing the exclusive access |
25 // bubble. | 25 // bubble. Not used for the simplified fullscreen UI. |
26 virtual views::Widget* GetBubbleAssociatedWidget() = 0; | 26 virtual views::Widget* GetBubbleAssociatedWidget() = 0; |
27 | 27 |
28 // Returns the view used to parent the bubble Widget. | |
29 virtual gfx::NativeView GetParentView() const = 0; | |
msw
2016/02/03 18:52:24
nit: maybe |GetBubbleParentView|?
tapted
2016/02/03 21:58:25
Done.
| |
30 | |
31 // Return the current mouse cursor location, offset from the top-left of the | |
32 // parent window. | |
33 virtual gfx::Point GetCursorPointInParent() const = 0; | |
34 | |
35 // Return the current bounds (not restored bounds) of the parent window. | |
36 virtual gfx::Rect GetClientAreaBoundsInScreen() const = 0; | |
37 | |
28 // Returns true if immersive mode is enabled. | 38 // Returns true if immersive mode is enabled. |
29 virtual bool IsImmersiveModeEnabled() = 0; | 39 virtual bool IsImmersiveModeEnabled() = 0; |
30 | 40 |
31 // Returns the bounds of the top level View in screen coordinate system. | 41 // Returns the bounds of the top level View in screen coordinate system. |
32 virtual gfx::Rect GetTopContainerBoundsInScreen() = 0; | 42 virtual gfx::Rect GetTopContainerBoundsInScreen() = 0; |
33 }; | 43 }; |
34 | 44 |
35 #endif // CHROME_BROWSER_UI_VIEWS_EXCLUSIVE_ACCESS_BUBBLE_VIEWS_CONTEXT_H_ | 45 #endif // CHROME_BROWSER_UI_VIEWS_EXCLUSIVE_ACCESS_BUBBLE_VIEWS_CONTEXT_H_ |
OLD | NEW |