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

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: Fix test for CrOS 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_delegate.h"
39 #include "chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h"
38 #include "chrome/browser/ui/bookmarks/bookmark_utils.h" 40 #include "chrome/browser/ui/bookmarks/bookmark_utils.h"
39 #include "chrome/browser/ui/browser.h" 41 #include "chrome/browser/ui/browser.h"
40 #include "chrome/browser/ui/browser_command_controller.h" 42 #include "chrome/browser/ui/browser_command_controller.h"
41 #include "chrome/browser/ui/browser_commands.h" 43 #include "chrome/browser/ui/browser_commands.h"
42 #include "chrome/browser/ui/browser_dialogs.h" 44 #include "chrome/browser/ui/browser_dialogs.h"
43 #include "chrome/browser/ui/browser_finder.h" 45 #include "chrome/browser/ui/browser_finder.h"
44 #include "chrome/browser/ui/browser_list.h" 46 #include "chrome/browser/ui/browser_list.h"
45 #include "chrome/browser/ui/browser_window_state.h" 47 #include "chrome/browser/ui/browser_window_state.h"
46 #include "chrome/browser/ui/immersive_fullscreen_configuration.h" 48 #include "chrome/browser/ui/immersive_fullscreen_configuration.h"
47 #include "chrome/browser/ui/ntp_background_util.h" 49 #include "chrome/browser/ui/ntp_background_util.h"
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 1110
1109 void BrowserView::ToggleBookmarkBar() { 1111 void BrowserView::ToggleBookmarkBar() {
1110 chrome::ToggleBookmarkBarWhenVisible(browser_->profile()); 1112 chrome::ToggleBookmarkBarWhenVisible(browser_->profile());
1111 } 1113 }
1112 1114
1113 void BrowserView::ShowUpdateChromeDialog() { 1115 void BrowserView::ShowUpdateChromeDialog() {
1114 UpdateRecommendedMessageBox::Show(GetWidget()->GetNativeWindow()); 1116 UpdateRecommendedMessageBox::Show(GetWidget()->GetNativeWindow());
1115 } 1117 }
1116 1118
1117 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) { 1119 void BrowserView::ShowBookmarkBubble(const GURL& url, bool already_bookmarked) {
1120 scoped_ptr<BookmarkBubbleDelegate> delegate;
1121 delegate.reset(new BookmarkBubbleSignInDelegate(browser_.get()));
1122
1118 chrome::ShowBookmarkBubbleView(GetToolbarView()->GetBookmarkBubbleAnchor(), 1123 chrome::ShowBookmarkBubbleView(GetToolbarView()->GetBookmarkBubbleAnchor(),
1119 bookmark_bar_view_.get(), browser_->profile(), 1124 bookmark_bar_view_.get(),
1120 url, !already_bookmarked); 1125 delegate.Pass(),
1126 browser_->profile(),
1127 url,
1128 !already_bookmarked);
1121 } 1129 }
1122 1130
1123 void BrowserView::ShowBookmarkPrompt() { 1131 void BrowserView::ShowBookmarkPrompt() {
1124 GetLocationBarView()->ShowBookmarkPrompt(); 1132 GetLocationBarView()->ShowBookmarkPrompt();
1125 } 1133 }
1126 1134
1127 #if defined(ENABLE_ONE_CLICK_SIGNIN) 1135 #if defined(ENABLE_ONE_CLICK_SIGNIN)
1128 void BrowserView::ShowOneClickSigninBubble( 1136 void BrowserView::ShowOneClickSigninBubble(
1129 OneClickSigninBubbleType type, 1137 OneClickSigninBubbleType type,
1130 const string16& email, 1138 const string16& email,
(...skipping 1602 matching lines...) Expand 10 before | Expand all | Expand 10 after
2733 // The +1 in the next line creates a 1-px gap between icon and arrow tip. 2741 // The +1 in the next line creates a 1-px gap between icon and arrow tip.
2734 gfx::Point icon_bottom(0, location_icon_view->GetImageBounds().bottom() - 2742 gfx::Point icon_bottom(0, location_icon_view->GetImageBounds().bottom() -
2735 LocationBarView::kIconInternalPadding + 1); 2743 LocationBarView::kIconInternalPadding + 1);
2736 ConvertPointToTarget(location_icon_view, this, &icon_bottom); 2744 ConvertPointToTarget(location_icon_view, this, &icon_bottom);
2737 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); 2745 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL));
2738 ConvertPointToTarget(infobar_container_, this, &infobar_top); 2746 ConvertPointToTarget(infobar_container_, this, &infobar_top);
2739 top_arrow_height = infobar_top.y() - icon_bottom.y(); 2747 top_arrow_height = infobar_top.y() - icon_bottom.y();
2740 } 2748 }
2741 return top_arrow_height; 2749 return top_arrow_height;
2742 } 2750 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_dialogs.h ('k') | chrome/browser/ui/webui/sync_promo/sync_promo_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698