| 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 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 | 1113 |
| 1114 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { | 1114 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { |
| 1115 GetLocationBarView()->ShowStarBubble(url, !already_bookmarked); | 1115 GetLocationBarView()->ShowStarBubble(url, !already_bookmarked); |
| 1116 } | 1116 } |
| 1117 | 1117 |
| 1118 void BrowserView::ShowChromeToMobileBubble() { | 1118 void BrowserView::ShowChromeToMobileBubble() { |
| 1119 GetLocationBarView()->ShowChromeToMobileBubble(); | 1119 GetLocationBarView()->ShowChromeToMobileBubble(); |
| 1120 } | 1120 } |
| 1121 | 1121 |
| 1122 #if defined(ENABLE_ONE_CLICK_SIGNIN) | 1122 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 1123 void BrowserView::ShowOneClickSigninBubble() { | 1123 void BrowserView::ShowOneClickSigninBubble( |
| 1124 OneClickSigninBubbleView::ShowBubble(toolbar_->app_menu(), browser_.get()); | 1124 const base::Closure& learn_more_callback, |
| 1125 const base::Closure& advanced_callback) { |
| 1126 OneClickSigninBubbleView::ShowBubble(toolbar_->app_menu(), |
| 1127 learn_more_callback, |
| 1128 advanced_callback); |
| 1125 } | 1129 } |
| 1126 #endif | 1130 #endif |
| 1127 | 1131 |
| 1128 void BrowserView::SetDownloadShelfVisible(bool visible) { | 1132 void BrowserView::SetDownloadShelfVisible(bool visible) { |
| 1129 // This can be called from the superclass destructor, when it destroys our | 1133 // This can be called from the superclass destructor, when it destroys our |
| 1130 // child views. At that point, browser_ is already gone. | 1134 // child views. At that point, browser_ is already gone. |
| 1131 if (browser_ == NULL) | 1135 if (browser_ == NULL) |
| 1132 return; | 1136 return; |
| 1133 | 1137 |
| 1134 if (visible && IsDownloadShelfVisible() != visible) { | 1138 if (visible && IsDownloadShelfVisible() != visible) { |
| (...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2495 return; | 2499 return; |
| 2496 | 2500 |
| 2497 PasswordGenerationBubbleView* bubble = | 2501 PasswordGenerationBubbleView* bubble = |
| 2498 new PasswordGenerationBubbleView(bounds, | 2502 new PasswordGenerationBubbleView(bounds, |
| 2499 this, | 2503 this, |
| 2500 web_contents->GetRenderViewHost()); | 2504 web_contents->GetRenderViewHost()); |
| 2501 browser::CreateViewsBubble(bubble); | 2505 browser::CreateViewsBubble(bubble); |
| 2502 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 2506 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
| 2503 bubble->Show(); | 2507 bubble->Show(); |
| 2504 } | 2508 } |
| OLD | NEW |