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 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { | 1058 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { |
1059 GetLocationBarView()->ShowStarBubble(url, !already_bookmarked); | 1059 GetLocationBarView()->ShowStarBubble(url, !already_bookmarked); |
1060 } | 1060 } |
1061 | 1061 |
1062 void BrowserView::ShowChromeToMobileBubble() { | 1062 void BrowserView::ShowChromeToMobileBubble() { |
1063 GetLocationBarView()->ShowChromeToMobileBubble(); | 1063 GetLocationBarView()->ShowChromeToMobileBubble(); |
1064 } | 1064 } |
1065 | 1065 |
1066 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 1066 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
1067 void BrowserView::ShowOneClickSigninBubble( | 1067 void BrowserView::ShowOneClickSigninBubble( |
1068 const base::Closure& learn_more_callback, | 1068 const StartSyncCallback& start_sync_callback) { |
1069 const base::Closure& advanced_callback) { | |
1070 OneClickSigninBubbleView::ShowBubble(toolbar_->app_menu(), | 1069 OneClickSigninBubbleView::ShowBubble(toolbar_->app_menu(), |
1071 learn_more_callback, | 1070 start_sync_callback); |
1072 advanced_callback); | |
1073 } | 1071 } |
1074 #endif | 1072 #endif |
1075 | 1073 |
1076 void BrowserView::SetDownloadShelfVisible(bool visible) { | 1074 void BrowserView::SetDownloadShelfVisible(bool visible) { |
1077 // This can be called from the superclass destructor, when it destroys our | 1075 // This can be called from the superclass destructor, when it destroys our |
1078 // child views. At that point, browser_ is already gone. | 1076 // child views. At that point, browser_ is already gone. |
1079 if (browser_ == NULL) | 1077 if (browser_ == NULL) |
1080 return; | 1078 return; |
1081 | 1079 |
1082 if (visible && IsDownloadShelfVisible() != visible) { | 1080 if (visible && IsDownloadShelfVisible() != visible) { |
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2415 return; | 2413 return; |
2416 | 2414 |
2417 PasswordGenerationBubbleView* bubble = | 2415 PasswordGenerationBubbleView* bubble = |
2418 new PasswordGenerationBubbleView(bounds, | 2416 new PasswordGenerationBubbleView(bounds, |
2419 this, | 2417 this, |
2420 web_contents->GetRenderViewHost()); | 2418 web_contents->GetRenderViewHost()); |
2421 views::BubbleDelegateView::CreateBubble(bubble); | 2419 views::BubbleDelegateView::CreateBubble(bubble); |
2422 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 2420 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
2423 bubble->Show(); | 2421 bubble->Show(); |
2424 } | 2422 } |
OLD | NEW |