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 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 } else { | 1120 } else { |
1121 browser::ShowBackgroundPages(); | 1121 browser::ShowBackgroundPages(); |
1122 } | 1122 } |
1123 #endif // defined(WEBUI_TASK_MANAGER) | 1123 #endif // defined(WEBUI_TASK_MANAGER) |
1124 } | 1124 } |
1125 | 1125 |
1126 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { | 1126 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { |
1127 GetLocationBarView()->ShowStarBubble(url, !already_bookmarked); | 1127 GetLocationBarView()->ShowStarBubble(url, !already_bookmarked); |
1128 } | 1128 } |
1129 | 1129 |
| 1130 void BrowserView::ShowChromeToMobileBubble() { |
| 1131 GetLocationBarView()->ShowChromeToMobileBubble(); |
| 1132 } |
| 1133 |
1130 void BrowserView::SetDownloadShelfVisible(bool visible) { | 1134 void BrowserView::SetDownloadShelfVisible(bool visible) { |
1131 // This can be called from the superclass destructor, when it destroys our | 1135 // This can be called from the superclass destructor, when it destroys our |
1132 // child views. At that point, browser_ is already gone. | 1136 // child views. At that point, browser_ is already gone. |
1133 if (browser_ == NULL) | 1137 if (browser_ == NULL) |
1134 return; | 1138 return; |
1135 | 1139 |
1136 if (visible && IsDownloadShelfVisible() != visible) { | 1140 if (visible && IsDownloadShelfVisible() != visible) { |
1137 // Invoke GetDownloadShelf to force the shelf to be created. | 1141 // Invoke GetDownloadShelf to force the shelf to be created. |
1138 GetDownloadShelf(); | 1142 GetDownloadShelf(); |
1139 } | 1143 } |
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2569 browser::CreateViewsBubble(bubble); | 2573 browser::CreateViewsBubble(bubble); |
2570 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); | 2574 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); |
2571 bubble->Show(); | 2575 bubble->Show(); |
2572 } | 2576 } |
2573 | 2577 |
2574 void BrowserView::ShowAvatarBubbleFromAvatarButton() { | 2578 void BrowserView::ShowAvatarBubbleFromAvatarButton() { |
2575 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); | 2579 AvatarMenuButton* button = frame_->GetAvatarMenuButton(); |
2576 if (button) | 2580 if (button) |
2577 button->ShowAvatarBubble(); | 2581 button->ShowAvatarBubble(); |
2578 } | 2582 } |
OLD | NEW |