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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 13866033: Animate the fullscreen exit bubble's opacity instead of its bounds when in immersive fullscreen (Closed) Base URL: http://git.chromium.org/chromium/src.git@exit_bubble
Patch Set: Created 7 years, 8 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
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 FullscreenExitBubbleType bubble_type) { 856 FullscreenExitBubbleType bubble_type) {
857 // Immersive mode has no exit bubble because it has a visible strip at the 857 // Immersive mode has no exit bubble because it has a visible strip at the
858 // top that gives the user a hover target. 858 // top that gives the user a hover target.
859 // TODO(jamescook): Figure out what to do with mouse-lock. 859 // TODO(jamescook): Figure out what to do with mouse-lock.
860 if (bubble_type == FEB_TYPE_NONE || UseImmersiveFullscreenForUrl(url)) { 860 if (bubble_type == FEB_TYPE_NONE || UseImmersiveFullscreenForUrl(url)) {
861 fullscreen_bubble_.reset(); 861 fullscreen_bubble_.reset();
862 } else if (fullscreen_bubble_.get()) { 862 } else if (fullscreen_bubble_.get()) {
863 fullscreen_bubble_->UpdateContent(url, bubble_type); 863 fullscreen_bubble_->UpdateContent(url, bubble_type);
864 } else { 864 } else {
865 fullscreen_bubble_.reset(new FullscreenExitBubbleViews( 865 fullscreen_bubble_.reset(new FullscreenExitBubbleViews(
866 GetWidget(), browser_.get(), url, bubble_type)); 866 this, url, bubble_type));
867 } 867 }
868 } 868 }
869 869
870 bool BrowserView::ShouldHideUIForFullscreen() const { 870 bool BrowserView::ShouldHideUIForFullscreen() const {
871 #if defined(USE_ASH) 871 #if defined(USE_ASH)
872 // Immersive mode needs UI for the slide-down top panel. 872 // Immersive mode needs UI for the slide-down top panel.
873 return IsFullscreen() && !immersive_mode_controller_->IsEnabled(); 873 return IsFullscreen() && !immersive_mode_controller_->IsEnabled();
874 #endif 874 #endif
875 return IsFullscreen(); 875 return IsFullscreen();
876 } 876 }
(...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after
2382 if (UseImmersiveFullscreenForUrl(url)) 2382 if (UseImmersiveFullscreenForUrl(url))
2383 immersive_mode_controller_->SetEnabled(fullscreen); 2383 immersive_mode_controller_->SetEnabled(fullscreen);
2384 2384
2385 browser_->WindowFullscreenStateChanged(); 2385 browser_->WindowFullscreenStateChanged();
2386 2386
2387 if (fullscreen) { 2387 if (fullscreen) {
2388 if (!chrome::IsRunningInAppMode() && 2388 if (!chrome::IsRunningInAppMode() &&
2389 type != FOR_METRO && 2389 type != FOR_METRO &&
2390 !UseImmersiveFullscreenForUrl(url)) { 2390 !UseImmersiveFullscreenForUrl(url)) {
2391 fullscreen_bubble_.reset(new FullscreenExitBubbleViews( 2391 fullscreen_bubble_.reset(new FullscreenExitBubbleViews(
2392 GetWidget(), browser_.get(), url, bubble_type)); 2392 this, url, bubble_type));
2393 } 2393 }
2394 } else { 2394 } else {
2395 #if defined(OS_WIN) && !defined(USE_AURA) 2395 #if defined(OS_WIN) && !defined(USE_AURA)
2396 if (omnibox_win) { 2396 if (omnibox_win) {
2397 // Show the edit again since we're no longer in fullscreen mode. 2397 // Show the edit again since we're no longer in fullscreen mode.
2398 omnibox_win->set_force_hidden(false); 2398 omnibox_win->set_force_hidden(false);
2399 ShowWindow(omnibox_win->m_hWnd, SW_SHOW); 2399 ShowWindow(omnibox_win->m_hWnd, SW_SHOW);
2400 } 2400 }
2401 #endif 2401 #endif
2402 } 2402 }
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
2718 2718
2719 Browser* modal_browser = 2719 Browser* modal_browser =
2720 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); 2720 chrome::FindBrowserWithWebContents(active_dialog->web_contents());
2721 if (modal_browser && (browser_ != modal_browser)) { 2721 if (modal_browser && (browser_ != modal_browser)) {
2722 modal_browser->window()->FlashFrame(true); 2722 modal_browser->window()->FlashFrame(true);
2723 modal_browser->window()->Activate(); 2723 modal_browser->window()->Activate();
2724 } 2724 }
2725 2725
2726 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2726 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2727 } 2727 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698