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

Unified Diff: chrome/browser/ui/browser.h

Issue 9479008: Re-factor location bar/toolbar code to get rid of the browser dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 8 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/browser.h
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 966b400244a06d406e6be909d0e1898c00746767..7bff67e8168d5ce417495429ef872992bd662b10 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -34,12 +34,14 @@
#include "chrome/browser/ui/bookmarks/bookmark_bar.h"
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper_delegate.h"
#include "chrome/browser/ui/browser_navigator.h"
+#include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
#include "chrome/browser/ui/constrained_window_tab_helper_delegate.h"
#include "chrome/browser/ui/dialog_style.h"
#include "chrome/browser/ui/fullscreen_exit_bubble_type.h"
#include "chrome/browser/ui/search_engines/search_engine_tab_helper_delegate.h"
#include "chrome/browser/ui/select_file_dialog.h"
#include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h"
+#include "chrome/browser/ui/tab_contents/tab_contents_wrapper_container.h"
#include "chrome/browser/ui/toolbar/toolbar_model.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/content_settings_types.h"
@@ -91,6 +93,8 @@ class Browser : public TabHandlerDelegate,
public CommandUpdater::CommandUpdaterDelegate,
public content::NotificationObserver,
public SelectFileDialog::Listener,
+ public TabContentsWrapperContainer,
+ public ContentSettingBubbleModelDelegate,
public TabRestoreServiceObserver,
public ProfileSyncServiceObserver,
public InstantDelegate {
@@ -403,18 +407,6 @@ class Browser : public TabHandlerDelegate,
return tab_handler_->GetTabStripModel();
}
- int tab_count() const;
- int active_index() const;
- int GetIndexOfController(
- const content::NavigationController* controller) const;
-
- // TODO(dpapad): Rename to GetActiveTabContentsWrapper().
- TabContentsWrapper* GetSelectedTabContentsWrapper() const;
- // A convenient version of the above which returns the TCW's WebContents.
- content::WebContents* GetSelectedWebContents() const;
- TabContentsWrapper* GetTabContentsWrapperAt(int index) const;
- // A convenient version of the above which returns the TCW's WebContents.
- content::WebContents* GetWebContentsAt(int index) const;
void ActivateTabAt(int index, bool user_gesture);
bool IsTabPinned(int index) const;
bool IsTabDiscarded(int index) const;
@@ -640,8 +632,6 @@ class Browser : public TabHandlerDelegate,
void ShowAboutConflictsTab();
void ShowBrokenPageTab(content::WebContents* contents);
void ShowOptionsTab(const std::string& sub_page);
- // Shows the Content Settings page for a given content type.
- void ShowContentSettingsPage(ContentSettingsType content_type);
void OpenClearBrowsingDataDialog();
void OpenOptionsDialog();
void OpenPasswordManager();
@@ -782,11 +772,23 @@ class Browser : public TabHandlerDelegate,
content::PageTransition transition,
bool user_initiated);
- // Shows the cookies collected in the tab contents wrapper.
- void ShowCollectedCookiesDialog(TabContentsWrapper* wrapper);
-
// Interface implementations ////////////////////////////////////////////////
+ // Overridden from ContentSettingBubbleModelDelegate:
+ virtual void ShowCollectedCookiesDialog(TabContentsWrapper* wrapper) OVERRIDE;
+ virtual void ShowContentSettingsPage(
+ ContentSettingsType content_type) OVERRIDE;
+
+ // Overriddent from TabContentsWrapperContainer:
+ virtual int tab_count() const OVERRIDE;
+ virtual int active_index() const OVERRIDE;
+ virtual int GetIndexOfController(
+ const content::NavigationController* controller) const OVERRIDE;
+ virtual TabContentsWrapper* GetSelectedTabContentsWrapper() const OVERRIDE;
+ virtual content::WebContents* GetSelectedWebContents() const OVERRIDE;
+ virtual TabContentsWrapper* GetTabContentsWrapperAt(int index) const OVERRIDE;
+ virtual content::WebContents* GetWebContentsAt(int index) const OVERRIDE;
+
// Overridden from content::PageNavigator:
virtual content::WebContents* OpenURL(
const content::OpenURLParams& params) OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698