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

Side by Side Diff: chrome/browser/ui/exclusive_access/exclusive_access_context.h

Issue 877413004: Refactor away the Browser* dependency in exclusive_access (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update based on CR comments Created 5 years, 10 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 (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_
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 the window host the exclusive access bubble is fullscreen.
scheib 2015/02/25 19:30:13 This comment needs fixing. BrowserWindow::IsFullsc
Sriram 2015/02/25 21:53:27 Done.
31 virtual bool IsFullscreenWithToolbar() const = 0;
32
33 // Methods that change fullscreen state.
scheib 2015/02/25 19:30:13 "Methods that change fullscreen state" -> "Enter f
Sriram 2015/02/25 21:53:27 Done.
34 // On Mac, the tab strip and toolbar will be shown if |with_toolbar| is true,
35 // |with_toolbar| is ignored on other platforms.
36 virtual void EnterFullscreen(const GURL& url,
37 ExclusiveAccessBubbleType bubble_type,
38 bool with_toolbar) = 0;
39
40 // Exits fullscreen and update exit bubble.
41 virtual void ExitFullscreen() = 0;
42
43 // Updates the content of exclusive access exit bubble content.
44 virtual void UpdateExclusiveAccessExitBubbleContent(
45 const GURL& url,
46 ExclusiveAccessBubbleType bubble_type) = 0;
47
48 // Returns the currently active WebContents, or nullptr if there is none.
49 virtual content::WebContents* GetActiveWebContents() = 0;
50
51 // Returns true if fullscreen with toolbar is supported.
52 virtual bool SupportsFullscreenWithToolbar() const;
scheib 2015/02/25 19:30:13 Move Supports____ and Update___ just above IsFulls
Sriram 2015/02/25 21:53:27 Done.
53
54 // Shows or hides the tab strip, toolbar and bookmark bar with in browser
55 // fullscreen.
56 // Currently only supported on Mac.
57 virtual void UpdateFullscreenWithToolbar(bool with_toolbar);
58
59 // Sets state for entering or exiting Win8 Metro snap mode.
scheib 2015/02/25 19:30:13 Wrap in #if defined(OS_WIN) as is done elsewhere t
Sriram 2015/02/25 21:53:27 Done.
60 virtual void SetMetroSnapMode(bool enable);
61
62 // Returns whether the window is currently in Win8 Metro snap mode.
63 virtual bool IsInMetroSnapMode() const;
64
65 // Shows or hides download shelf associated with currently active window.
66 virtual void UpdateDownloadShelf(bool unhide);
scheib 2015/02/25 19:30:13 The naming is and readability suffers (have to loo
Sriram 2015/02/25 21:53:27 Done.
67 };
68
69 #endif // CHROME_BROWSER_UI_EXCLUSIVE_ACCESS_EXCLUSIVE_ACCESS_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698