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

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

Issue 428583004: Translate: Bug fix: Wrong way to check if the window is minimized (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 if (rvh->IsFocusedElementEditable()) 1167 if (rvh->IsFocusedElementEditable())
1168 return; 1168 return;
1169 } 1169 }
1170 1170
1171 ChromeTranslateClient* chrome_translate_client = 1171 ChromeTranslateClient* chrome_translate_client =
1172 ChromeTranslateClient::FromWebContents(web_contents); 1172 ChromeTranslateClient::FromWebContents(web_contents);
1173 translate::LanguageState& language_state = 1173 translate::LanguageState& language_state =
1174 chrome_translate_client->GetLanguageState(); 1174 chrome_translate_client->GetLanguageState();
1175 language_state.SetTranslateEnabled(true); 1175 language_state.SetTranslateEnabled(true);
1176 1176
1177 if (!IsActive()) 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 #if defined(ENABLE_ONE_CLICK_SIGNIN) 1185 #if defined(ENABLE_ONE_CLICK_SIGNIN)
1186 void BrowserView::ShowOneClickSigninBubble( 1186 void BrowserView::ShowOneClickSigninBubble(
1187 OneClickSigninBubbleType type, 1187 OneClickSigninBubbleType type,
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
2536 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { 2536 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) {
2537 gfx::Point icon_bottom( 2537 gfx::Point icon_bottom(
2538 toolbar_->location_bar()->GetLocationBarAnchorPoint()); 2538 toolbar_->location_bar()->GetLocationBarAnchorPoint());
2539 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); 2539 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom);
2540 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2540 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2541 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2541 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2542 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2542 top_arrow_height = infobar_top.y() - icon_bottom.y();
2543 } 2543 }
2544 return top_arrow_height; 2544 return top_arrow_height;
2545 } 2545 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698