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 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1231 | 1231 |
1232 void BrowserView::ShowUpdateChromeDialog() { | 1232 void BrowserView::ShowUpdateChromeDialog() { |
1233 UpdateRecommendedMessageBox::Show(GetWidget()->GetNativeWindow()); | 1233 UpdateRecommendedMessageBox::Show(GetWidget()->GetNativeWindow()); |
1234 } | 1234 } |
1235 | 1235 |
1236 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { | 1236 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { |
1237 scoped_ptr<BookmarkBubbleDelegate> delegate; | 1237 scoped_ptr<BookmarkBubbleDelegate> delegate; |
1238 delegate.reset(new BookmarkBubbleSignInDelegate(browser_.get())); | 1238 delegate.reset(new BookmarkBubbleSignInDelegate(browser_.get())); |
1239 | 1239 |
1240 BookmarkBubbleView::ShowBubble(GetToolbarView()->GetBookmarkBubbleAnchor(), | 1240 BookmarkBubbleView::ShowBubble(GetToolbarView()->GetBookmarkBubbleAnchor(), |
1241 bookmark_bar_view_.get(), | 1241 gfx::Rect(), nullptr, bookmark_bar_view_.get(), |
1242 delegate.Pass(), | 1242 delegate.Pass(), browser_->profile(), url, |
1243 browser_->profile(), | 1243 already_bookmarked); |
1244 url, | |
1245 !already_bookmarked); | |
1246 } | 1244 } |
1247 | 1245 |
1248 void BrowserView::ShowBookmarkAppBubble( | 1246 void BrowserView::ShowBookmarkAppBubble( |
1249 const WebApplicationInfo& web_app_info, | 1247 const WebApplicationInfo& web_app_info, |
1250 const ShowBookmarkAppBubbleCallback& callback) { | 1248 const ShowBookmarkAppBubbleCallback& callback) { |
1251 BookmarkAppBubbleView::ShowBubble(GetToolbarView(), web_app_info, callback); | 1249 BookmarkAppBubbleView::ShowBubble(GetToolbarView(), web_app_info, callback); |
1252 } | 1250 } |
1253 | 1251 |
1254 void BrowserView::ShowTranslateBubble( | 1252 void BrowserView::ShowTranslateBubble( |
1255 content::WebContents* web_contents, | 1253 content::WebContents* web_contents, |
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2595 return immersive_mode_controller()->IsEnabled(); | 2593 return immersive_mode_controller()->IsEnabled(); |
2596 } | 2594 } |
2597 | 2595 |
2598 views::Widget* BrowserView::GetBubbleAssociatedWidget() { | 2596 views::Widget* BrowserView::GetBubbleAssociatedWidget() { |
2599 return GetWidget(); | 2597 return GetWidget(); |
2600 } | 2598 } |
2601 | 2599 |
2602 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { | 2600 gfx::Rect BrowserView::GetTopContainerBoundsInScreen() { |
2603 return top_container_->GetBoundsInScreen(); | 2601 return top_container_->GetBoundsInScreen(); |
2604 } | 2602 } |
OLD | NEW |