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..3eea0f51732b22a5780f22cbf32fe4875551fc01 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 |
@@ -992,17 +992,17 @@ bool BrowserView::IsFullscreenWithToolbar() const { |
return false; |
} |
-#if defined(OS_WIN) |
void BrowserView::SetMetroSnapMode(bool enable) { |
+#if defined(OS_WIN) |
LOCAL_HISTOGRAM_COUNTS("Metro.SnapModeToggle", enable); |
ProcessFullscreen(enable, METRO_SNAP_FULLSCREEN, GURL(), |
EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE); |
+#endif // defined(OS_WIN) |
} |
bool BrowserView::IsInMetroSnapMode() const { |
return false; |
} |
-#endif // defined(OS_WIN) |
void BrowserView::RestoreFocus() { |
WebContents* selected_web_contents = GetActiveWebContents(); |
@@ -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::UpdateDownloadShelf(bool unhide) { |
+ if (unhide) { |
+ GetDownloadShelf()->Unhide(); |
+ } else { |
+ 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(); |
+} |