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

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

Issue 7740044: Implement fullscreen info bubble on Win and Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ups Created 9 years, 2 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 7d097c6ef6783c3f2aba24620284d0e46e0b0bbf..ddc4a03a3663932d49326806cb97939b7b03a511 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -589,7 +589,7 @@ void BrowserView::ShowInactive() {
}
void BrowserView::SetBounds(const gfx::Rect& bounds) {
- SetFullscreen(false);
+ SetFullscreen(false, GURL(), false);
GetWidget()->SetBounds(bounds);
}
@@ -750,12 +750,13 @@ bool BrowserView::IsMinimized() const {
return frame_->IsMinimized();
}
-void BrowserView::SetFullscreen(bool fullscreen) {
+void BrowserView::SetFullscreen(bool fullscreen, const GURL& url,
Peter Kasting 2011/10/11 23:08:32 Nit: One arg per line, aligned
koz (OOO until 15th September) 2011/10/12 05:38:23 Done.
+ bool ask_permission) {
if (IsFullscreen() == fullscreen)
return; // Nothing to do.
-#if defined(OS_WIN) && !defined(USE_AURA)
- ProcessFullscreen(fullscreen);
+#if defined(OS_WIN)
+ ProcessFullscreen(fullscreen, url, ask_permission);
#else
// On Linux changing fullscreen is async. Ask the window to change it's
// fullscreen state, and when done invoke ProcessFullscreen.
@@ -772,7 +773,7 @@ bool BrowserView::IsFullscreenBubbleVisible() const {
}
void BrowserView::FullScreenStateChanged() {
- ProcessFullscreen(IsFullscreen());
+ ProcessFullscreen(IsFullscreen(), GURL(), false);
}
void BrowserView::RestoreFocus() {
@@ -2166,7 +2167,8 @@ bool BrowserView::UpdateChildViewAndLayout(views::View* new_view,
return changed;
}
-void BrowserView::ProcessFullscreen(bool fullscreen) {
+void BrowserView::ProcessFullscreen(bool fullscreen, const GURL& url,
Peter Kasting 2011/10/11 23:08:32 Nit: One arg per line, aligned
koz (OOO until 15th September) 2011/10/12 05:38:23 Done.
+ bool ask_permission) {
// Reduce jankiness during the following position changes by:
// * Hiding the window until it's in the final position
// * Ignoring all intervening Layout() calls, which resize the webpage and
@@ -2216,7 +2218,9 @@ void BrowserView::ProcessFullscreen(bool fullscreen) {
CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode);
if (!is_kiosk) {
fullscreen_bubble_.reset(new FullscreenExitBubbleViews(GetWidget(),
- browser_.get()));
+ browser_.get(),
Peter Kasting 2011/10/11 23:08:32 Nit: I'd just put all these on one line and indent
koz (OOO until 15th September) 2011/10/12 05:38:23 Done.
+ url,
+ ask_permission));
}
} else {
#if defined(OS_WIN) && !defined(USE_AURA)
@@ -2236,7 +2240,6 @@ void BrowserView::ProcessFullscreen(bool fullscreen) {
#endif
}
-
void BrowserView::LoadAccelerators() {
#if defined(USE_AURA)
// TODO(beng):

Powered by Google App Engine
This is Rietveld 408576698