Chromium Code Reviews| 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..f7b952c9ed7f4cccad46a695d81ec39373ffa627 100644 |
| --- a/chrome/browser/ui/views/location_bar/location_bar_view.h |
| +++ b/chrome/browser/ui/views/location_bar/location_bar_view.h |
| @@ -33,7 +33,10 @@ |
| #endif |
| class Browser; |
| +class BrowserShowContentRelated; |
| +class BrowserShowPageInfo; |
| class ContentSettingImageView; |
| +class CommandUpdater; |
| class EVBubbleView; |
| class ExtensionAction; |
| class GURL; |
| @@ -41,11 +44,18 @@ class InstantController; |
| class KeywordHintView; |
| class LocationIconView; |
| class PageActionWithBadgeView; |
| +class PageActionImageView; |
| +class Profile; |
| class SelectedKeywordView; |
| class StarView; |
| class TabContentsWrapper; |
| class TemplateURLService; |
| +namespace views { |
| +class BubbleDelegateView; |
| +class Widget; |
| +} |
| + |
| #if defined(OS_WIN) || defined(USE_AURA) |
| class SuggestedTextView; |
| #endif |
| @@ -85,6 +95,20 @@ class LocationBarView : public LocationBar, |
| // Returns the InstantController, or NULL if there isn't one. |
| virtual InstantController* GetInstant() = 0; |
| + // Returns BrowserShowContentRelated to be used. |
| + virtual BrowserShowContentRelated* GetBrowserShowContentRelated() = 0; |
|
sky
2012/02/29 22:41:10
Do we really need to expose objects for the method
altimofeev
2012/03/01 10:05:39
They could. But why is it better? BrowserShowActio
sky
2012/03/01 16:34:47
I believe you are arguing for a class per method a
altimofeev
2012/03/01 18:01:07
I've gotten rid of "BrowserShow..." classes (one d
|
| + |
| + // Returns BrowserShowPageInfo to be used. |
| + virtual BrowserShowPageInfo* GetBrowserShowPageInfo() = 0; |
| + |
| + // Creates Widget for the given delegate. |
| + virtual views::Widget* CreateViewsBubble( |
| + views::BubbleDelegateView* bubble_delegate) = 0; |
| + |
| + // Creates PageActionImageView. Caller gets an ownership. |
| + virtual PageActionImageView* CreatePageActionImageView( |
| + LocationBarView* owner, ExtensionAction* action) = 0; |
|
sky
2012/02/29 22:41:10
nit: when you wrap, each param on its own line.
altimofeev
2012/03/01 10:05:39
Done.
|
| + |
| // Called by the location bar view when the user starts typing in the edit. |
| // This forces our security style to be UNKNOWN for the duration of the |
| // editing. |
| @@ -111,10 +135,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 +159,11 @@ 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 profile. |
| + Profile* profile() const { return profile_; } |
| + |
| + // Creates Widget for the given delegate. |
| + views::Widget* CreateViewsBubble(views::BubbleDelegateView* bubble_delegate); |
| // Sets |preview_enabled| for the PageAction View associated with this |
| // |page_action|. If |preview_enabled| is true, the view will display the |
| @@ -348,8 +378,8 @@ class LocationBarView : public LocationBar, |
| // The Autocomplete Edit field. |
| scoped_ptr<OmniboxView> location_entry_; |
| - // The Browser object that corresponds to this View. |
| - Browser* browser_; |
| + Profile* profile_; |
| + CommandUpdater* command_updater_; |
| // The model. |
| ToolbarModel* model_; |