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 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 BookmarkBubbleView::ShowBubble(GetToolbarView()->GetBookmarkBubbleAnchor(), | 1227 BookmarkBubbleView::ShowBubble(GetToolbarView()->GetBookmarkBubbleAnchor(), |
1228 bookmark_bar_view_.get(), | 1228 bookmark_bar_view_.get(), |
1229 delegate.Pass(), | 1229 delegate.Pass(), |
1230 browser_->profile(), | 1230 browser_->profile(), |
1231 url, | 1231 url, |
1232 !already_bookmarked); | 1232 !already_bookmarked); |
1233 } | 1233 } |
1234 | 1234 |
1235 void BrowserView::ShowBookmarkAppBubble( | 1235 void BrowserView::ShowBookmarkAppBubble( |
1236 const WebApplicationInfo& web_app_info, | 1236 const WebApplicationInfo& web_app_info, |
1237 const std::string& extension_id) { | 1237 const ShowBookmarkAppBubbleCallback& callback) { |
1238 BookmarkAppBubbleView::ShowBubble(GetToolbarView(), | 1238 BookmarkAppBubbleView::ShowBubble(GetToolbarView(), web_app_info, callback); |
1239 browser_->profile(), | |
1240 web_app_info, | |
1241 extension_id); | |
1242 } | 1239 } |
1243 | 1240 |
1244 void BrowserView::ShowTranslateBubble( | 1241 void BrowserView::ShowTranslateBubble( |
1245 content::WebContents* web_contents, | 1242 content::WebContents* web_contents, |
1246 translate::TranslateStep step, | 1243 translate::TranslateStep step, |
1247 translate::TranslateErrors::Type error_type, | 1244 translate::TranslateErrors::Type error_type, |
1248 bool is_user_gesture) { | 1245 bool is_user_gesture) { |
1249 if (contents_web_view_->HasFocus() && | 1246 if (contents_web_view_->HasFocus() && |
1250 !GetLocationBarView()->IsMouseHovered()) { | 1247 !GetLocationBarView()->IsMouseHovered()) { |
1251 content::RenderViewHost* rvh = web_contents->GetRenderViewHost(); | 1248 content::RenderViewHost* rvh = web_contents->GetRenderViewHost(); |
(...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2572 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2569 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
2573 gfx::Point icon_bottom( | 2570 gfx::Point icon_bottom( |
2574 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2571 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
2575 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2572 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
2576 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(nullptr)); | 2573 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(nullptr)); |
2577 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2574 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
2578 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2575 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
2579 } | 2576 } |
2580 return top_arrow_height; | 2577 return top_arrow_height; |
2581 } | 2578 } |
OLD | NEW |