| 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 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 void BrowserView::ShowBookmarkPrompt() { | 1201 void BrowserView::ShowBookmarkPrompt() { |
| 1202 GetLocationBarView()->ShowBookmarkPrompt(); | 1202 GetLocationBarView()->ShowBookmarkPrompt(); |
| 1203 } | 1203 } |
| 1204 | 1204 |
| 1205 void BrowserView::ShowTranslateBubble( | 1205 void BrowserView::ShowTranslateBubble( |
| 1206 content::WebContents* web_contents, | 1206 content::WebContents* web_contents, |
| 1207 TranslateBubbleModel::ViewState view_state, | 1207 TranslateBubbleModel::ViewState view_state, |
| 1208 TranslateErrors::Type error_type) { | 1208 TranslateErrors::Type error_type) { |
| 1209 TranslateTabHelper* translate_tab_helper = | 1209 TranslateTabHelper* translate_tab_helper = |
| 1210 TranslateTabHelper::FromWebContents(web_contents); | 1210 TranslateTabHelper::FromWebContents(web_contents); |
| 1211 LanguageState& language_state = translate_tab_helper->language_state(); | 1211 LanguageState& language_state = translate_tab_helper->GetLanguageState(); |
| 1212 language_state.SetTranslateEnabled(true); | 1212 language_state.SetTranslateEnabled(true); |
| 1213 | 1213 |
| 1214 TranslateBubbleView::ShowBubble(GetToolbarView()->GetTranslateBubbleAnchor(), | 1214 TranslateBubbleView::ShowBubble(GetToolbarView()->GetTranslateBubbleAnchor(), |
| 1215 web_contents, view_state, error_type); | 1215 web_contents, view_state, error_type); |
| 1216 } | 1216 } |
| 1217 | 1217 |
| 1218 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 1218 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 1219 void BrowserView::ShowOneClickSigninBubble( | 1219 void BrowserView::ShowOneClickSigninBubble( |
| 1220 OneClickSigninBubbleType type, | 1220 OneClickSigninBubbleType type, |
| 1221 const base::string16& email, | 1221 const base::string16& email, |
| (...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2563 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2563 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
| 2564 gfx::Point icon_bottom( | 2564 gfx::Point icon_bottom( |
| 2565 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2565 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
| 2566 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2566 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
| 2567 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2567 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
| 2568 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2568 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
| 2569 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2569 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
| 2570 } | 2570 } |
| 2571 return top_arrow_height; | 2571 return top_arrow_height; |
| 2572 } | 2572 } |
| OLD | NEW |