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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.h

Issue 6837021: Disable bookmark editing (views UI). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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/location_bar/location_bar_view.h
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h
index cc05e2d103f3574dd2b1ecda425e2b3544cf5664..7ffa8026487d9ab59d08bd68ec9c228954561edd 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -14,6 +14,7 @@
#include "chrome/browser/autocomplete/autocomplete_edit.h"
#include "chrome/browser/extensions/extension_context_menu_model.h"
#include "chrome/browser/first_run/first_run.h"
+#include "chrome/browser/prefs/pref_member.h"
#include "chrome/browser/search_engines/template_url_model_observer.h"
#include "chrome/browser/ui/omnibox/location_bar.h"
#include "chrome/browser/ui/toolbar/toolbar_model.h"
@@ -66,7 +67,8 @@ class LocationBarView : public LocationBar,
public views::View,
public views::DragController,
public AutocompleteEditController,
- public TemplateURLModelObserver {
+ public TemplateURLModelObserver,
+ public NotificationObserver {
public:
// The location bar view's class name.
static const char kViewClassName[];
@@ -252,6 +254,11 @@ class LocationBarView : public LocationBar,
// Overridden from TemplateURLModelObserver
virtual void OnTemplateURLModelChanged() OVERRIDE;
+ // Overridden from NotificationObserver
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details) OVERRIDE;
+
// Thickness of the left and right edges of the omnibox, in normal mode.
static const int kNormalHorizontalEdgeThickness;
// Thickness of the top and bottom edges of the omnibox.
@@ -403,6 +410,9 @@ class LocationBarView : public LocationBar,
// crash.
TemplateURLModel* template_url_model_;
+ // Tracks this preference to determine whether bookmark editing is allowed.
+ BooleanPrefMember edit_bookmarks_enabled_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView);
};

Powered by Google App Engine
This is Rietveld 408576698