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

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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 FullscreenExitBubbleType bubble_type) { 860 FullscreenExitBubbleType bubble_type) {
861 // Immersive mode has no exit bubble because it has a visible strip at the 861 // Immersive mode has no exit bubble because it has a visible strip at the
862 // top that gives the user a hover target. 862 // top that gives the user a hover target.
863 // TODO(jamescook): Figure out what to do with mouse-lock. 863 // TODO(jamescook): Figure out what to do with mouse-lock.
864 if (bubble_type == FEB_TYPE_NONE || UseImmersiveFullscreenForUrl(url)) { 864 if (bubble_type == FEB_TYPE_NONE || UseImmersiveFullscreenForUrl(url)) {
865 fullscreen_bubble_.reset(); 865 fullscreen_bubble_.reset();
866 } else if (fullscreen_bubble_.get()) { 866 } else if (fullscreen_bubble_.get()) {
867 fullscreen_bubble_->UpdateContent(url, bubble_type); 867 fullscreen_bubble_->UpdateContent(url, bubble_type);
868 } else { 868 } else {
869 fullscreen_bubble_.reset(new FullscreenExitBubbleViews( 869 fullscreen_bubble_.reset(new FullscreenExitBubbleViews(
870 GetWidget(), browser_.get(), url, bubble_type)); 870 this, url, bubble_type));
871 } 871 }
872 } 872 }
873 873
874 bool BrowserView::ShouldHideUIForFullscreen() const { 874 bool BrowserView::ShouldHideUIForFullscreen() const {
875 #if defined(USE_ASH) 875 #if defined(USE_ASH)
876 // Immersive mode needs UI for the slide-down top panel. 876 // Immersive mode needs UI for the slide-down top panel.
877 return IsFullscreen() && !immersive_mode_controller_->IsEnabled(); 877 return IsFullscreen() && !immersive_mode_controller_->IsEnabled();
878 #endif 878 #endif
879 return IsFullscreen(); 879 return IsFullscreen();
880 } 880 }
(...skipping 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after
2391 if (UseImmersiveFullscreenForUrl(url)) 2391 if (UseImmersiveFullscreenForUrl(url))
2392 immersive_mode_controller_->SetEnabled(fullscreen); 2392 immersive_mode_controller_->SetEnabled(fullscreen);
2393 2393
2394 browser_->WindowFullscreenStateChanged(); 2394 browser_->WindowFullscreenStateChanged();
2395 2395
2396 if (fullscreen) { 2396 if (fullscreen) {
2397 if (!chrome::IsRunningInAppMode() && 2397 if (!chrome::IsRunningInAppMode() &&
2398 type != FOR_METRO && 2398 type != FOR_METRO &&
2399 !UseImmersiveFullscreenForUrl(url)) { 2399 !UseImmersiveFullscreenForUrl(url)) {
2400 fullscreen_bubble_.reset(new FullscreenExitBubbleViews( 2400 fullscreen_bubble_.reset(new FullscreenExitBubbleViews(
2401 GetWidget(), browser_.get(), url, bubble_type)); 2401 this, url, bubble_type));
2402 } 2402 }
2403 } else { 2403 } else {
2404 #if defined(OS_WIN) && !defined(USE_AURA) 2404 #if defined(OS_WIN) && !defined(USE_AURA)
2405 if (omnibox_win) { 2405 if (omnibox_win) {
2406 // Show the edit again since we're no longer in fullscreen mode. 2406 // Show the edit again since we're no longer in fullscreen mode.
2407 omnibox_win->set_force_hidden(false); 2407 omnibox_win->set_force_hidden(false);
2408 ShowWindow(omnibox_win->m_hWnd, SW_SHOW); 2408 ShowWindow(omnibox_win->m_hWnd, SW_SHOW);
2409 } 2409 }
2410 #endif 2410 #endif
2411 } 2411 }
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
2727 2727
2728 Browser* modal_browser = 2728 Browser* modal_browser =
2729 chrome::FindBrowserWithWebContents(active_dialog->web_contents()); 2729 chrome::FindBrowserWithWebContents(active_dialog->web_contents());
2730 if (modal_browser && (browser_ != modal_browser)) { 2730 if (modal_browser && (browser_ != modal_browser)) {
2731 modal_browser->window()->FlashFrame(true); 2731 modal_browser->window()->FlashFrame(true);
2732 modal_browser->window()->Activate(); 2732 modal_browser->window()->Activate();
2733 } 2733 }
2734 2734
2735 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); 2735 AppModalDialogQueue::GetInstance()->ActivateModalDialog();
2736 } 2736 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.h ('k') | chrome/browser/ui/views/fullscreen_exit_bubble_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698