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

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

Issue 739793003: Close bubbles not on UpdateToolbar but when the activated tab is changed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 language_state.SetTranslateEnabled(true); 1175 language_state.SetTranslateEnabled(true);
1176 1176
1177 if (IsMinimized()) 1177 if (IsMinimized())
1178 return; 1178 return;
1179 1179
1180 TranslateBubbleView::ShowBubble( 1180 TranslateBubbleView::ShowBubble(
1181 GetToolbarView()->GetTranslateBubbleAnchor(), web_contents, step, 1181 GetToolbarView()->GetTranslateBubbleAnchor(), web_contents, step,
1182 error_type, is_user_gesture); 1182 error_type, is_user_gesture);
1183 } 1183 }
1184 1184
1185 void BrowserView::CloseTranslateBubble() {
1186 TranslateBubbleView::CloseBubble();
1187 }
1188
1185 #if defined(ENABLE_ONE_CLICK_SIGNIN) 1189 #if defined(ENABLE_ONE_CLICK_SIGNIN)
1186 void BrowserView::ShowOneClickSigninBubble( 1190 void BrowserView::ShowOneClickSigninBubble(
1187 OneClickSigninBubbleType type, 1191 OneClickSigninBubbleType type,
1188 const base::string16& email, 1192 const base::string16& email,
1189 const base::string16& error_message, 1193 const base::string16& error_message,
1190 const StartSyncCallback& start_sync_callback) { 1194 const StartSyncCallback& start_sync_callback) {
1191 scoped_ptr<OneClickSigninBubbleDelegate> delegate; 1195 scoped_ptr<OneClickSigninBubbleDelegate> delegate;
1192 delegate.reset(new OneClickSigninBubbleLinksDelegate(browser())); 1196 delegate.reset(new OneClickSigninBubbleLinksDelegate(browser()));
1193 1197
1194 views::View* anchor_view; 1198 views::View* anchor_view;
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after
2498 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { 2502 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) {
2499 gfx::Point icon_bottom( 2503 gfx::Point icon_bottom(
2500 toolbar_->location_bar()->GetLocationBarAnchorPoint()); 2504 toolbar_->location_bar()->GetLocationBarAnchorPoint());
2501 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); 2505 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom);
2502 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(nullptr)); 2506 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(nullptr));
2503 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2507 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2504 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2508 top_arrow_height = infobar_top.y() - icon_bottom.y();
2505 } 2509 }
2506 return top_arrow_height; 2510 return top_arrow_height;
2507 } 2511 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698