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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.h

Issue 12310109: Add a shortcut to open the Apps page from the bookmark bar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
index ea5b94fe7b51138f79b9b5b207270d303924e503..b1f6d543411d1097c3fae46c37d816256d369e68 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.h
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "base/memory/weak_ptr.h"
+#include "base/prefs/public/pref_change_registrar.h"
#include "chrome/browser/bookmarks/bookmark_model_observer.h"
#include "chrome/browser/bookmarks/bookmark_node_data.h"
#include "chrome/browser/ui/bookmarks/bookmark_bar.h"
@@ -289,6 +290,9 @@ class BookmarkBarView : public DetachableToolbarView,
// Creates the button for rendering the specified bookmark node.
views::View* CreateBookmarkButton(const BookmarkNode* node);
+ // Creates the button for rendering the apps page shortcut.
+ views::TextButton* CreateAppsPageShortcutButton();
+
// Configures the button from the specified node. This sets the text,
// and icon.
void ConfigureButton(const BookmarkNode* node, views::TextButton* button);
@@ -351,6 +355,14 @@ class BookmarkBarView : public DetachableToolbarView,
// desired bounds. If |compute_bounds_only| = FALSE, the bounds are set.
gfx::Size LayoutItems(bool compute_bounds_only);
+ // Returns true is we should show the apps shortcut.
+ bool ShouldShowAppsShortcut();
Alexei Svitkine (slow) 2013/02/25 21:13:29 Can this be const?
MAD 2013/02/25 21:41:01 Done.
+
+ // Updates the visibility of the apps shortcut based on the pref value.
+ void OnAppsPageShortcutVisibilityChanged();
+
+ PrefChangeRegistrar profile_pref_registrar_;
Alexei Svitkine (slow) 2013/02/25 21:13:29 Comment mentioning which pref this is for.
MAD 2013/02/25 21:41:01 Done.
+
// Used for opening urls.
content::PageNavigator* page_navigator_;
@@ -374,6 +386,9 @@ class BookmarkBarView : public DetachableToolbarView,
// Shows the other bookmark entries.
views::MenuButton* other_bookmarked_button_;
+ // Shows the Apps page shortcut.
+ views::TextButton* apps_page_shortcut_;
+
// Task used to delay showing of the drop menu.
base::WeakPtrFactory<BookmarkBarView> show_folder_method_factory_;

Powered by Google App Engine
This is Rietveld 408576698