OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 #ifndef CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTEXT_H_ | |
miu
2015/02/26 20:07:57
Please add a newline above this line.
Sriram
2015/02/26 23:58:03
Done.
| |
5 #define CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTEXT_H_ | |
6 | |
7 #include "chrome/browser/ui/exclusive_access/exclusive_access_bubble_type.h" | |
8 | |
9 class GURL; | |
10 class Profile; | |
11 | |
12 namespace content { | |
13 class WebContents; | |
14 } | |
15 | |
16 // Context in which exclusive access operation is being performed. This | |
17 // interface is implemented once in Browser context and in Platform Application | |
18 // context. | |
19 class ExclusiveAccessContext { | |
20 public: | |
21 virtual ~ExclusiveAccessContext() {} | |
22 | |
23 // Returns the current profile associated with the window. | |
24 virtual Profile* GetProfile() = 0; | |
25 | |
26 // Returns true if the window hosting the exclusive access bubble is | |
27 // fullscreen. | |
28 virtual bool IsFullscreen() const = 0; | |
29 | |
30 // Returns true if fullscreen with toolbar is supported. | |
31 virtual bool SupportsFullscreenWithToolbar() const; | |
32 | |
33 // Shows or hides the tab strip, toolbar and bookmark bar with in browser | |
34 // fullscreen. | |
35 // Currently only supported on Mac. | |
36 virtual void UpdateFullscreenWithToolbar(bool with_toolbar); | |
37 // Returns true if the window is fullscreen with additional UI elements. See | |
miu
2015/02/26 20:07:56
Please add a newline above this line.
Sriram
2015/02/26 23:58:03
Done.
| |
38 // EnterFullscreen |with_toolbar|. | |
39 virtual bool IsFullscreenWithToolbar() const = 0; | |
40 | |
41 // Enters fullscreen and update exit bubble. | |
42 // On Mac, the tab strip and toolbar will be shown if |with_toolbar| is true, | |
43 // |with_toolbar| is ignored on other platforms. | |
44 virtual void EnterFullscreen(const GURL& url, | |
45 ExclusiveAccessBubbleType bubble_type, | |
46 bool with_toolbar) = 0; | |
47 | |
48 // Exits fullscreen and update exit bubble. | |
49 virtual void ExitFullscreen() = 0; | |
50 | |
51 // Updates the content of exclusive access exit bubble content. | |
52 virtual void UpdateExclusiveAccessExitBubbleContent( | |
53 const GURL& url, | |
54 ExclusiveAccessBubbleType bubble_type) = 0; | |
55 | |
56 #if defined(OS_WIN) | |
57 // Sets state for entering or exiting Win8 Metro snap mode. | |
58 virtual void SetMetroSnapMode(bool enable); | |
59 | |
60 // Returns whether the window is currently in Win8 Metro snap mode. | |
61 virtual bool IsInMetroSnapMode() const; | |
62 #endif // defined(OS_WIN) | |
63 | |
64 // Returns the currently active WebContents, or nullptr if there is none. | |
65 virtual content::WebContents* GetActiveWebContents() = 0; | |
66 | |
67 // Displays the download shelf associated with currently active window. | |
68 virtual void UnhideDownloadShelf(); | |
miu
2015/02/26 20:07:57
The hide/unhide download shelf methods are an abst
Sriram
2015/02/26 23:58:03
Done.
| |
69 | |
70 // Hides download shelf associated with currently active window. | |
71 virtual void HideDownloadShelf(); | |
72 }; | |
73 | |
74 #endif // CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTEXT_H_ | |
OLD | NEW |