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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 1308293002: [Mac] Refactor bookmark pulsing into BookmarkBubbleObserverCocoa. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarkeditor
Patch Set: Address comments. Update unit_tests. Created 5 years, 4 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 (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/bookmarks/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 UMA_HISTOGRAM_COUNTS("Import.ShowDialog.FromBookmarkBarView", 1206 UMA_HISTOGRAM_COUNTS("Import.ShowDialog.FromBookmarkBarView",
1207 time_from_install); 1207 time_from_install);
1208 } else if (bookmark_bar_state_ == BookmarkBar::DETACHED) { 1208 } else if (bookmark_bar_state_ == BookmarkBar::DETACHED) {
1209 UMA_HISTOGRAM_COUNTS("Import.ShowDialog.FromFloatingBookmarkBarView", 1209 UMA_HISTOGRAM_COUNTS("Import.ShowDialog.FromFloatingBookmarkBarView",
1210 time_from_install); 1210 time_from_install);
1211 } 1211 }
1212 1212
1213 chrome::ShowImportDialog(browser_); 1213 chrome::ShowImportDialog(browser_);
1214 } 1214 }
1215 1215
1216 void BookmarkBarView::OnBookmarkBubbleShown(const GURL& url) { 1216 void BookmarkBarView::OnBookmarkBubbleShown(const BookmarkNode* node) {
1217 StopThrobbing(true); 1217 StopThrobbing(true);
1218 const BookmarkNode* node = model_->GetMostRecentlyAddedUserNodeForURL(url);
1219 if (!node) 1218 if (!node)
1220 return; // Generally shouldn't happen. 1219 return; // Generally shouldn't happen.
1221 StartThrobbing(node, false); 1220 StartThrobbing(node, false);
1222 } 1221 }
1223 1222
1224 void BookmarkBarView::OnBookmarkBubbleHidden() { 1223 void BookmarkBarView::OnBookmarkBubbleHidden() {
1225 StopThrobbing(false); 1224 StopThrobbing(false);
1226 } 1225 }
1227 1226
1228 void BookmarkBarView::BookmarkModelLoaded(BookmarkModel* model, 1227 void BookmarkBarView::BookmarkModelLoaded(BookmarkModel* model,
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
2075 return; 2074 return;
2076 apps_page_shortcut_->SetVisible(visible); 2075 apps_page_shortcut_->SetVisible(visible);
2077 UpdateBookmarksSeparatorVisibility(); 2076 UpdateBookmarksSeparatorVisibility();
2078 LayoutAndPaint(); 2077 LayoutAndPaint();
2079 } 2078 }
2080 2079
2081 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { 2080 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() {
2082 if (UpdateOtherAndManagedButtonsVisibility()) 2081 if (UpdateOtherAndManagedButtonsVisibility())
2083 LayoutAndPaint(); 2082 LayoutAndPaint();
2084 } 2083 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.h ('k') | chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698