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

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 compile errs 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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 if (!browser_->tab_strip_model()->closing_all() && GetWidget()->IsActive() && 928 if (!browser_->tab_strip_model()->closing_all() && GetWidget()->IsActive() &&
929 GetWidget()->IsVisible()) { 929 GetWidget()->IsVisible()) {
930 // We only restore focus if our window is visible, to avoid invoking blur 930 // We only restore focus if our window is visible, to avoid invoking blur
931 // handlers when we are eventually shown. 931 // handlers when we are eventually shown.
932 new_contents->RestoreFocus(); 932 new_contents->RestoreFocus();
933 } 933 }
934 934
935 // Update all the UI bits. 935 // Update all the UI bits.
936 UpdateTitleBar(); 936 UpdateTitleBar();
937 937
938 TranslateBubbleView::CloseBubble(); 938 TranslateBubbleView::CloseCurrentBubble();
939 ZoomBubbleView::CloseBubble(); 939 ZoomBubbleView::CloseCurrentBubble();
940 } 940 }
941 941
942 void BrowserView::ZoomChangedForActiveTab(bool can_show_bubble) { 942 void BrowserView::ZoomChangedForActiveTab(bool can_show_bubble) {
943 bool app_menu_showing = toolbar_->app_menu_button() && 943 bool app_menu_showing = toolbar_->app_menu_button() &&
944 toolbar_->app_menu_button()->IsMenuShowing(); 944 toolbar_->app_menu_button()->IsMenuShowing();
945 GetLocationBarView()->ZoomChangedForActiveTab(can_show_bubble && 945 GetLocationBarView()->ZoomChangedForActiveTab(can_show_bubble &&
946 !app_menu_showing); 946 !app_menu_showing);
947 } 947 }
948 948
949 gfx::Rect BrowserView::GetRestoredBounds() const { 949 gfx::Rect BrowserView::GetRestoredBounds() const {
(...skipping 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after
2721 } 2721 }
2722 2722
2723 extensions::ActiveTabPermissionGranter* 2723 extensions::ActiveTabPermissionGranter*
2724 BrowserView::GetActiveTabPermissionGranter() { 2724 BrowserView::GetActiveTabPermissionGranter() {
2725 content::WebContents* web_contents = GetActiveWebContents(); 2725 content::WebContents* web_contents = GetActiveWebContents();
2726 if (!web_contents) 2726 if (!web_contents)
2727 return nullptr; 2727 return nullptr;
2728 return extensions::TabHelper::FromWebContents(web_contents) 2728 return extensions::TabHelper::FromWebContents(web_contents)
2729 ->active_tab_permission_granter(); 2729 ->active_tab_permission_granter();
2730 } 2730 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698