Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 18603006: Bookmark sync promo for Views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Common layout constants Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 17 matching lines...) Expand all
28 #include "chrome/browser/profiles/profile_info_cache.h" 28 #include "chrome/browser/profiles/profile_info_cache.h"
29 #include "chrome/browser/profiles/profile_manager.h" 29 #include "chrome/browser/profiles/profile_manager.h"
30 #include "chrome/browser/search/search.h" 30 #include "chrome/browser/search/search.h"
31 #include "chrome/browser/sessions/tab_restore_service.h" 31 #include "chrome/browser/sessions/tab_restore_service.h"
32 #include "chrome/browser/sessions/tab_restore_service_factory.h" 32 #include "chrome/browser/sessions/tab_restore_service_factory.h"
33 #include "chrome/browser/speech/tts_controller.h" 33 #include "chrome/browser/speech/tts_controller.h"
34 #include "chrome/browser/themes/theme_properties.h" 34 #include "chrome/browser/themes/theme_properties.h"
35 #include "chrome/browser/themes/theme_service_factory.h" 35 #include "chrome/browser/themes/theme_service_factory.h"
36 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" 36 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h"
37 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h" 37 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog_queue.h"
38 #include "chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h"
38 #include "chrome/browser/ui/bookmarks/bookmark_utils.h" 39 #include "chrome/browser/ui/bookmarks/bookmark_utils.h"
39 #include "chrome/browser/ui/browser.h" 40 #include "chrome/browser/ui/browser.h"
40 #include "chrome/browser/ui/browser_command_controller.h" 41 #include "chrome/browser/ui/browser_command_controller.h"
41 #include "chrome/browser/ui/browser_commands.h" 42 #include "chrome/browser/ui/browser_commands.h"
42 #include "chrome/browser/ui/browser_dialogs.h" 43 #include "chrome/browser/ui/browser_dialogs.h"
43 #include "chrome/browser/ui/browser_finder.h" 44 #include "chrome/browser/ui/browser_finder.h"
44 #include "chrome/browser/ui/browser_list.h" 45 #include "chrome/browser/ui/browser_list.h"
45 #include "chrome/browser/ui/browser_window_state.h" 46 #include "chrome/browser/ui/browser_window_state.h"
46 #include "chrome/browser/ui/immersive_fullscreen_configuration.h" 47 #include "chrome/browser/ui/immersive_fullscreen_configuration.h"
47 #include "chrome/browser/ui/ntp_background_util.h" 48 #include "chrome/browser/ui/ntp_background_util.h"
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 1109
1109 void BrowserView::ToggleBookmarkBar() { 1110 void BrowserView::ToggleBookmarkBar() {
1110 chrome::ToggleBookmarkBarWhenVisible(browser_->profile()); 1111 chrome::ToggleBookmarkBarWhenVisible(browser_->profile());
1111 } 1112 }
1112 1113
1113 void BrowserView::ShowUpdateChromeDialog() { 1114 void BrowserView::ShowUpdateChromeDialog() {
1114 UpdateRecommendedMessageBox::Show(GetWidget()->GetNativeWindow()); 1115 UpdateRecommendedMessageBox::Show(GetWidget()->GetNativeWindow());
1115 } 1116 }
1116 1117
1117 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { 1118 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) {
1118 chrome::ShowBookmarkBubbleView(GetToolbarView()->GetBookmarkBubbleAnchor(), 1119 chrome::ShowBookmarkBubbleView(
1119 bookmark_bar_view_.get(), browser_->profile(), 1120 GetToolbarView()->GetBookmarkBubbleAnchor(),
1120 url, !already_bookmarked); 1121 bookmark_bar_view_.get(),
1122 new BookmarkBubbleSignInDelegate(browser_.get()),
1123 browser_->profile(),
1124 url,
1125 !already_bookmarked);
1121 } 1126 }
1122 1127
1123 void BrowserView::ShowBookmarkPrompt() { 1128 void BrowserView::ShowBookmarkPrompt() {
1124 GetLocationBarView()->ShowBookmarkPrompt(); 1129 GetLocationBarView()->ShowBookmarkPrompt();
1125 } 1130 }
1126 1131
1127 void BrowserView::ShowChromeToMobileBubble() { 1132 void BrowserView::ShowChromeToMobileBubble() {
1128 GetLocationBarView()->ShowChromeToMobileBubble(); 1133 GetLocationBarView()->ShowChromeToMobileBubble();
1129 } 1134 }
1130 1135
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
2741 // The +1 in the next line creates a 1-px gap between icon and arrow tip. 2746 // The +1 in the next line creates a 1-px gap between icon and arrow tip.
2742 gfx::Point icon_bottom(0, location_icon_view->GetImageBounds().bottom() - 2747 gfx::Point icon_bottom(0, location_icon_view->GetImageBounds().bottom() -
2743 LocationBarView::kIconInternalPadding + 1); 2748 LocationBarView::kIconInternalPadding + 1);
2744 ConvertPointToTarget(location_icon_view, this, &icon_bottom); 2749 ConvertPointToTarget(location_icon_view, this, &icon_bottom);
2745 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2750 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2746 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2751 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2747 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2752 top_arrow_height = infobar_top.y() - icon_bottom.y();
2748 } 2753 }
2749 return top_arrow_height; 2754 return top_arrow_height;
2750 } 2755 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698