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

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

Issue 1759453002: Convert location bar bubble delegates to bubble dialog delegates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ImmersiveFullscreenController Created 4 years, 9 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 <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 if (!browser_->tab_strip_model()->closing_all() && GetWidget()->IsActive() && 907 if (!browser_->tab_strip_model()->closing_all() && GetWidget()->IsActive() &&
908 GetWidget()->IsVisible()) { 908 GetWidget()->IsVisible()) {
909 // We only restore focus if our window is visible, to avoid invoking blur 909 // We only restore focus if our window is visible, to avoid invoking blur
910 // handlers when we are eventually shown. 910 // handlers when we are eventually shown.
911 new_contents->RestoreFocus(); 911 new_contents->RestoreFocus();
912 } 912 }
913 913
914 // Update all the UI bits. 914 // Update all the UI bits.
915 UpdateTitleBar(); 915 UpdateTitleBar();
916 916
917 TranslateBubbleView::CloseBubble(); 917 TranslateBubbleView::CloseCurrentBubble();
918 ZoomBubbleView::CloseBubble(); 918 ZoomBubbleView::CloseCurrentBubble();
919 } 919 }
920 920
921 void BrowserView::ZoomChangedForActiveTab(bool can_show_bubble) { 921 void BrowserView::ZoomChangedForActiveTab(bool can_show_bubble) {
922 bool app_menu_showing = toolbar_->app_menu_button() && 922 bool app_menu_showing = toolbar_->app_menu_button() &&
923 toolbar_->app_menu_button()->IsMenuShowing(); 923 toolbar_->app_menu_button()->IsMenuShowing();
924 GetLocationBarView()->ZoomChangedForActiveTab(can_show_bubble && 924 GetLocationBarView()->ZoomChangedForActiveTab(can_show_bubble &&
925 !app_menu_showing); 925 !app_menu_showing);
926 } 926 }
927 927
928 gfx::Rect BrowserView::GetRestoredBounds() const { 928 gfx::Rect BrowserView::GetRestoredBounds() const {
(...skipping 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after
2700 } 2700 }
2701 2701
2702 extensions::ActiveTabPermissionGranter* 2702 extensions::ActiveTabPermissionGranter*
2703 BrowserView::GetActiveTabPermissionGranter() { 2703 BrowserView::GetActiveTabPermissionGranter() {
2704 content::WebContents* web_contents = GetActiveWebContents(); 2704 content::WebContents* web_contents = GetActiveWebContents();
2705 if (!web_contents) 2705 if (!web_contents)
2706 return nullptr; 2706 return nullptr;
2707 return extensions::TabHelper::FromWebContents(web_contents) 2707 return extensions::TabHelper::FromWebContents(web_contents)
2708 ->active_tab_permission_granter(); 2708 ->active_tab_permission_granter();
2709 } 2709 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698