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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 877413004: Refactor away the Browser* dependency in exclusive_access (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename toggle fullscreen function 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 33ee5a13f0b62b91d5e3536a09e95e27b1a61112..2eb35fe21eb493ed3e43a8ed12257cac70364378 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -946,7 +946,7 @@ void BrowserView::ExitFullscreen() {
EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE);
}
-void BrowserView::UpdateFullscreenExitBubbleContent(
+void BrowserView::UpdateExclusiveAccessExitBubbleContent(
const GURL& url,
ExclusiveAccessBubbleType bubble_type) {
// Immersive mode has no exit bubble because it has a visible strip at the
@@ -2280,7 +2280,7 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
if (fullscreen && !chrome::IsRunningInAppMode() &&
mode != METRO_SNAP_FULLSCREEN) {
- UpdateFullscreenExitBubbleContent(url, bubble_type);
+ UpdateExclusiveAccessExitBubbleContent(url, bubble_type);
}
// Undo our anti-jankiness hacks and force a re-layout. We also need to
@@ -2502,6 +2502,10 @@ void BrowserView::ExecuteExtensionCommand(
toolbar_->ExecuteExtensionCommand(extension, command);
}
+ExclusiveAccessContext* BrowserView::GetExclusiveAccessContext() {
+ return this;
+}
+
void BrowserView::DoCutCopyPaste(void (WebContents::*method)(),
int command_id) {
WebContents* contents = browser_->tab_strip_model()->GetActiveWebContents();
@@ -2568,3 +2572,38 @@ int BrowserView::GetMaxTopInfoBarArrowHeight() {
}
return top_arrow_height;
}
+
+///////////////////////////////////////////////////////////////////////////////
+// BrowserView, ExclusiveAccessContext overrides
+Profile* BrowserView::GetProfile() {
+ return browser_->profile();
+}
+
+WebContents* BrowserView::GetActiveWebContents() {
+ return browser_->tab_strip_model()->GetActiveWebContents();
+}
+
+void BrowserView::UnhideDownloadShelf() {
+ GetDownloadShelf()->Unhide();
+}
+
+void BrowserView::HideDownloadShelf() {
+ GetDownloadShelf()->Hide();
+ StatusBubble* statusBubble = GetStatusBubble();
+ if (statusBubble)
+ statusBubble->Hide();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// BrowserView, ExclusiveAccessBubbleViewsContext overrides
+ExclusiveAccessManager* BrowserView::GetExclusiveAccessManager() {
+ return browser_->exclusive_access_manager();
+}
+
+bool BrowserView::IsImmersiveModeEnabled() {
+ return immersive_mode_controller()->IsEnabled();
+}
+
+gfx::Rect BrowserView::GetTopContainerBoundsInScreen() {
+ return top_container_->GetBoundsInScreen();
+}

Powered by Google App Engine
This is Rietveld 408576698