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 94777a274bdf0ab48da61fa8b26a15a6ebd0bcc2..a941d41f21339e591fc58c4feef3c6f6f92db703 100644 |
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h |
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h |
@@ -34,6 +34,7 @@ |
class Browser; |
class ContentSettingImageView; |
+class CommandUpdater; |
class EVBubbleView; |
class ExtensionAction; |
class GURL; |
@@ -41,6 +42,7 @@ class InstantController; |
class KeywordHintView; |
class LocationIconView; |
class PageActionWithBadgeView; |
+class Profile; |
class SelectedKeywordView; |
class StarView; |
class TabContentsWrapper; |
@@ -111,10 +113,12 @@ class LocationBarView : public LocationBar, |
APP_LAUNCHER |
}; |
- LocationBarView(Browser* browser, |
+ LocationBarView(Profile* profile, |
+ CommandUpdater* command_updater, |
ToolbarModel* model, |
Delegate* delegate, |
Mode mode); |
+ |
virtual ~LocationBarView(); |
void Init(); |
@@ -133,7 +137,13 @@ class LocationBarView : public LocationBar, |
// saved state that the tab holds. |
void Update(const content::WebContents* tab_for_state_restoring); |
- Browser* browser() const { return browser_; } |
+ // Returns corresponding browser. Could return NULL if there is no browser or |
+ // WebContents hasn't been created yet. |
+ // Note, to get profile use 'profile()' method below. |
+ Browser* FindBrowser(); |
sky
2012/02/28 18:24:24
Same comment here as with ToolbarModel.
altimofeev
2012/02/29 18:57:29
Done. I've created interfaces BrowserShowContentRe
|
+ |
+ // Returns corresponding profile. |
+ Profile* profile() const { return profile_; } |
// Sets |preview_enabled| for the PageAction View associated with this |
// |page_action|. If |preview_enabled| is true, the view will display the |
@@ -348,7 +358,11 @@ class LocationBarView : public LocationBar, |
// The Autocomplete Edit field. |
scoped_ptr<OmniboxView> location_entry_; |
- // The Browser object that corresponds to this View. |
+ Profile* profile_; |
+ CommandUpdater* command_updater_; |
+ |
+ // Cached value of the browser. Useful because searching needs O(N) time, |
+ // where N is the number of tabs. |
Browser* browser_; |
// The model. |