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

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

Issue 3042010: Fixes for first run path.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/first_run_win.cc ('k') | chrome/browser/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/location_bar/location_bar_view.h
===================================================================
--- chrome/browser/views/location_bar/location_bar_view.h (revision 53256)
+++ chrome/browser/views/location_bar/location_bar_view.h (working copy)
@@ -13,6 +13,7 @@
#include "chrome/browser/extensions/extension_context_menu_model.h"
#include "chrome/browser/first_run.h"
#include "chrome/browser/location_bar.h"
+#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/toolbar_model.h"
#include "chrome/browser/views/extensions/extension_popup.h"
@@ -58,7 +59,8 @@
public LocationBarTesting,
public views::View,
public views::DragController,
- public AutocompleteEditController {
+ public AutocompleteEditController,
+ public TemplateURLModelObserver {
public:
// The location bar view's class name.
static const char kViewClassName[];
@@ -103,8 +105,8 @@
void Init();
- // Returns whether this instance has been initialized by callin Init. Init can
- // only be called when the receiving instance is attached to a view container.
+ // True if this instance has been initialized by calling Init, which can only
+ // be called when the receiving instance is attached to a view container.
bool IsInitialized() const;
// Returns the appropriate color for the desired kind, based on the user's
@@ -220,6 +222,9 @@
virtual ExtensionAction* GetVisiblePageAction(size_t index);
virtual void TestPageActionPressed(size_t index);
+ // Overridden from TemplateURLModelObserver
+ virtual void OnTemplateURLModelChanged();
+
static const int kVertMargin; // Space above and below the edit.
static const int kEdgeThickness; // Unavailable space at horizontal edges.
static const int kItemPadding; // Space between items within the bar.
@@ -351,13 +356,18 @@
// focused. Used when the toolbar is in full keyboard accessibility mode.
bool show_focus_rect_;
+ // Whether bubble text is short or long.
+ FirstRun::BubbleType bubble_type_;
+
+ // This is in case we're destroyed before the model loads. We store the model
+ // because calling profile_->GetTemplateURLModel() in the destructor causes a
+ // crash.
+ TemplateURLModel* template_url_model_;
+
#if defined(OS_LINUX)
scoped_ptr<AccessibleWidgetHelper> accessible_widget_helper_;
#endif
- // Used to schedule a task for the first run info bubble.
- ScopedRunnableMethodFactory<LocationBarView> first_run_bubble_;
-
DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView);
};
« no previous file with comments | « chrome/browser/first_run_win.cc ('k') | chrome/browser/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698