| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |