summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/frame/browser_view.h
diff options
context:
space:
mode:
authorsriramsr <sriramsr@chromium.org>2015-03-03 16:03:32 -0800
committerCommit bot <commit-bot@chromium.org>2015-03-04 00:05:07 +0000
commit39b6b787e7c4cbcecf1c9be40e9f47b76cd3c14b (patch)
treea4364f260f85533d6bd0bbee8bf06229bb14d4b1 /chrome/browser/ui/views/frame/browser_view.h
parent59e9a996f54bb238beb5a51dd864eb0febb8728c (diff)
downloadchromium_src-39b6b787e7c4cbcecf1c9be40e9f47b76cd3c14b.zip
chromium_src-39b6b787e7c4cbcecf1c9be40e9f47b76cd3c14b.tar.gz
chromium_src-39b6b787e7c4cbcecf1c9be40e9f47b76cd3c14b.tar.bz2
Refactor away the Browser* dependency in exclusive_access
This change is needed to support the use of the exclusive access bubble from extensions. There are two scenarios under which the bubble will be used to: - Display the bubble when keyboard lock is in effect. - Display the fullscreen/mouse lock UI from Hosted app (not hooked up in this CL). Exclusive access controllers such as fullscreen and mouse lock are updated to no longer access Browser* object directly, but instead use new ExclusiveAccessContext and ExclusiveAccessBubbleViewsContext interfaces. These are implemented by BrowserView and will in the future be implemented by NativeAppWindow. Review URL: https://codereview.chromium.org/877413004 Cr-Commit-Position: refs/heads/master@{#318965}
Diffstat (limited to 'chrome/browser/ui/views/frame/browser_view.h')
-rw-r--r--chrome/browser/ui/views/frame/browser_view.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index a85e479..de510a0 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -17,9 +17,11 @@
#include "chrome/browser/signin/signin_header_helper.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
#include "chrome/browser/ui/infobar_container_delegate.h"
#include "chrome/browser/ui/omnibox/omnibox_popup_model_observer.h"
#include "chrome/browser/ui/tabs/tab_strip_model_observer.h"
+#include "chrome/browser/ui/views/exclusive_access_bubble_views_context.h"
#include "chrome/browser/ui/views/frame/browser_frame.h"
#include "chrome/browser/ui/views/frame/contents_web_view.h"
#include "chrome/browser/ui/views/frame/immersive_mode_controller.h"
@@ -85,7 +87,9 @@ class BrowserView : public BrowserWindow,
public views::ClientView,
public InfoBarContainerDelegate,
public LoadCompleteListener::Delegate,
- public OmniboxPopupModelObserver {
+ public OmniboxPopupModelObserver,
+ public ExclusiveAccessContext,
+ public ExclusiveAccessBubbleViewsContext {
public:
// The browser view's class name.
static const char kViewClassName[];
@@ -275,7 +279,7 @@ class BrowserView : public BrowserWindow,
ExclusiveAccessBubbleType bubble_type,
bool with_toolbar) override;
void ExitFullscreen() override;
- void UpdateFullscreenExitBubbleContent(
+ void UpdateExclusiveAccessExitBubbleContent(
const GURL& url,
ExclusiveAccessBubbleType bubble_type) override;
bool ShouldHideUIForFullscreen() const override;
@@ -285,9 +289,9 @@ class BrowserView : public BrowserWindow,
void UpdateFullscreenWithToolbar(bool with_toolbar) override;
bool IsFullscreenWithToolbar() const override;
#if defined(OS_WIN)
- virtual void SetMetroSnapMode(bool enable) override;
- virtual bool IsInMetroSnapMode() const override;
-#endif
+ void SetMetroSnapMode(bool enable) override;
+ bool IsInMetroSnapMode() const override;
+#endif // defined(OS_WIN)
LocationBar* GetLocationBar() const override;
void SetFocusToLocationBar(bool select_all) override;
void UpdateReloadStopState(bool is_loading, bool force) override;
@@ -361,6 +365,7 @@ class BrowserView : public BrowserWindow,
int GetRenderViewHeightInsetWithDetachedBookmarkBar() override;
void ExecuteExtensionCommand(const extensions::Extension* extension,
const extensions::Command& command) override;
+ ExclusiveAccessContext* GetExclusiveAccessContext() override;
BookmarkBarView* GetBookmarkBarView() const;
LocationBarView* GetLocationBarView() const;
@@ -438,6 +443,18 @@ class BrowserView : public BrowserWindow,
// OmniboxPopupModelObserver overrides
void OnOmniboxPopupShownOrHidden() override;
+ // ExclusiveAccessContext overrides
+ Profile* GetProfile() override;
+ content::WebContents* GetActiveWebContents() override;
+ void HideDownloadShelf() override;
+ void UnhideDownloadShelf() override;
+
+ // ExclusiveAccessBubbleViewsContext overrides
+ ExclusiveAccessManager* GetExclusiveAccessManager() override;
+ bool IsImmersiveModeEnabled() override;
+ views::Widget* GetBubbleAssociatedWidget() override;
+ gfx::Rect GetTopContainerBoundsInScreen() override;
+
// Testing interface:
views::View* GetContentsContainerForTest() { return contents_container_; }
views::WebView* GetContentsWebViewForTest() { return contents_web_view_; }