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 | 4 |
5 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTEXT_H_ |
6 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTEXT_H_ | 6 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTEXT_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h" | 9 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h" |
10 | 10 |
11 class GURL; | 11 class GURL; |
12 class Profile; | 12 class Profile; |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 class WebContents; | 15 class WebContents; |
16 } | 16 } |
17 | 17 |
18 // Context in which exclusive access operation is being performed. This | 18 // Context in which exclusive access operation is being performed. This |
19 // interface is implemented once in Browser context and in Platform Application | 19 // interface is implemented once in Browser context and in Platform Application |
20 // context. | 20 // context. |
21 class ExclusiveAccessContext { | 21 class ExclusiveAccessContext { |
22 public: | 22 public: |
| 23 enum TabFullscreenState { |
| 24 STATE_ENTER_TAB_FULLSCREEN, |
| 25 STATE_EXIT_TAB_FULLSCREEN, |
| 26 }; |
| 27 |
23 virtual ~ExclusiveAccessContext() {} | 28 virtual ~ExclusiveAccessContext() {} |
24 | 29 |
25 // Returns the current profile associated with the window. | 30 // Returns the current profile associated with the window. |
26 virtual Profile* GetProfile() = 0; | 31 virtual Profile* GetProfile() = 0; |
27 | 32 |
28 // Returns true if the window hosting the exclusive access bubble is | 33 // Returns true if the window hosting the exclusive access bubble is |
29 // fullscreen. | 34 // fullscreen. |
30 virtual bool IsFullscreen() const = 0; | 35 virtual bool IsFullscreen() const = 0; |
31 | 36 |
32 // Shows or hides the tab strip, toolbar and bookmark bar with in browser | 37 // Called when we transition between tab and browser fullscreen. This method |
33 // fullscreen. | 38 // updates the UI by showing/hiding the tab strip, toolbar and bookmark bar |
34 // Currently only supported on Mac. | 39 // in the browser fullscreen. Currently only supported on Mac. |
35 // TODO (spqchan): Deprecate this method. crbug.com/579259 | 40 virtual void UpdateUIForTabFullscreen(TabFullscreenState state); |
36 virtual void UpdateFullscreenWithToolbar(bool with_toolbar); | |
37 | 41 |
38 // Updates the toolbar state to be hidden or shown in fullscreen according to | 42 // Updates the toolbar state to be hidden or shown in fullscreen according to |
39 // the preference's state. Only supported on Mac. | 43 // the preference's state. Only supported on Mac. |
40 virtual void UpdateFullscreenToolbar(); | 44 virtual void UpdateFullscreenToolbar(); |
41 | 45 |
42 // Enters fullscreen and update exit bubble. | 46 // Enters fullscreen and update exit bubble. |
43 virtual void EnterFullscreen(const GURL& url, | 47 virtual void EnterFullscreen(const GURL& url, |
44 ExclusiveAccessBubbleType bubble_type) = 0; | 48 ExclusiveAccessBubbleType bubble_type) = 0; |
45 | 49 |
46 // Exits fullscreen and update exit bubble. | 50 // Exits fullscreen and update exit bubble. |
(...skipping 16 matching lines...) Expand all Loading... |
63 // hide/unhide its download shelf widget when it is instructed to enter/exit | 67 // hide/unhide its download shelf widget when it is instructed to enter/exit |
64 // fullscreen mode. | 68 // fullscreen mode. |
65 // Displays the download shelf associated with currently active window. | 69 // Displays the download shelf associated with currently active window. |
66 virtual void UnhideDownloadShelf() = 0; | 70 virtual void UnhideDownloadShelf() = 0; |
67 | 71 |
68 // Hides download shelf associated with currently active window. | 72 // Hides download shelf associated with currently active window. |
69 virtual void HideDownloadShelf() = 0; | 73 virtual void HideDownloadShelf() = 0; |
70 }; | 74 }; |
71 | 75 |
72 #endif // CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTEXT_H_ | 76 #endif // CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTEXT_H_ |
OLD | NEW |