OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1051 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { | 1051 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { |
1052 GetLocationBarView()->ShowStarBubble(url, !already_bookmarked); | 1052 GetLocationBarView()->ShowStarBubble(url, !already_bookmarked); |
1053 } | 1053 } |
1054 | 1054 |
1055 void BrowserView::ShowChromeToMobileBubble() { | 1055 void BrowserView::ShowChromeToMobileBubble() { |
1056 GetLocationBarView()->ShowChromeToMobileBubble(); | 1056 GetLocationBarView()->ShowChromeToMobileBubble(); |
1057 } | 1057 } |
1058 | 1058 |
1059 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 1059 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
1060 void BrowserView::ShowOneClickSigninBubble( | 1060 void BrowserView::ShowOneClickSigninBubble( |
1061 const base::Closure& learn_more_callback, | 1061 const base::Callback<void(bool)>& start_sync_callback) { |
1062 const base::Closure& advanced_callback) { | |
1063 OneClickSigninBubbleView::ShowBubble(toolbar_->app_menu(), | 1062 OneClickSigninBubbleView::ShowBubble(toolbar_->app_menu(), |
1064 learn_more_callback, | 1063 start_sync_callback); |
1065 advanced_callback); | |
1066 } | 1064 } |
1067 #endif | 1065 #endif |
1068 | 1066 |
1069 void BrowserView::SetDownloadShelfVisible(bool visible) { | 1067 void BrowserView::SetDownloadShelfVisible(bool visible) { |
1070 // This can be called from the superclass destructor, when it destroys our | 1068 // This can be called from the superclass destructor, when it destroys our |
1071 // child views. At that point, browser_ is already gone. | 1069 // child views. At that point, browser_ is already gone. |
1072 if (browser_ == NULL) | 1070 if (browser_ == NULL) |
1073 return; | 1071 return; |
1074 | 1072 |
1075 if (visible && IsDownloadShelfVisible() != visible) { | 1073 if (visible && IsDownloadShelfVisible() != visible) { |
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2407 return; | 2405 return; |
2408 | 2406 |
2409 PasswordGenerationBubbleView* bubble = | 2407 PasswordGenerationBubbleView* bubble = |
2410 new PasswordGenerationBubbleView(bounds, | 2408 new PasswordGenerationBubbleView(bounds, |
2411 this, | 2409 this, |
2412 web_contents->GetRenderViewHost()); | 2410 web_contents->GetRenderViewHost()); |
2413 views::BubbleDelegateView::CreateBubble(bubble); | 2411 views::BubbleDelegateView::CreateBubble(bubble); |
2414 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 2412 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
2415 bubble->Show(); | 2413 bubble->Show(); |
2416 } | 2414 } |
OLD | NEW |