summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.h
diff options
context:
space:
mode:
authorstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-23 23:09:43 +0000
committerstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-23 23:09:43 +0000
commite0c7c263ba8720bc8616fc1ed73a1480dc931f6f (patch)
treeccd10968df3aae90a09db0766318a564f24132bc /chrome/browser/browser.h
parent6e939b54d6c746bf2a75b605a344bb8efede7915 (diff)
downloadchromium_src-e0c7c263ba8720bc8616fc1ed73a1480dc931f6f.zip
chromium_src-e0c7c263ba8720bc8616fc1ed73a1480dc931f6f.tar.gz
chromium_src-e0c7c263ba8720bc8616fc1ed73a1480dc931f6f.tar.bz2
Move Browser implementation of callback interfaces into the private section.
Split TabContentsDelegate and PageNavigator. Review URL: http://codereview.chromium.org/88063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14375 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.h')
-rw-r--r--chrome/browser/browser.h48
1 files changed, 39 insertions, 9 deletions
diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h
index d0f2d6f..9566d1f 100644
--- a/chrome/browser/browser.h
+++ b/chrome/browser/browser.h
@@ -40,6 +40,7 @@ class TabNavigation;
class Browser : public TabStripModelDelegate,
public TabStripModelObserver,
public TabContentsDelegate,
+ public PageNavigator,
public CommandUpdater::CommandUpdaterDelegate,
public NotificationObserver,
public SelectFileDialog::Listener {
@@ -234,6 +235,29 @@ class Browser : public TabStripModelDelegate,
int tab_index,
int selected_navigation,
bool select);
+ // Creates a new tab with the already-created TabContents 'new_contents'.
+ // The window for the added contents will be reparented correctly when this
+ // method returns. If |disposition| is NEW_POPUP, |pos| should hold the
+ // initial position.
+ void AddTabContents(TabContents* new_contents,
+ WindowOpenDisposition disposition,
+ const gfx::Rect& initial_pos,
+ bool user_gesture);
+ void CloseTabContents(TabContents* contents);
+
+ // Show a dialog with HTML content. |delegate| contains a pointer to the
+ // delegate who knows how to display the dialog (which file URL and JSON
+ // string input to use during initialization). |parent_window| is the window
+ // that should be parent of the dialog, or NULL for the default.
+ void BrowserShowHtmlDialog(HtmlDialogUIDelegate* delegate,
+ void* parent_window);
+
+ // Called when a popup select is about to be displayed.
+ void BrowserRenderWidgetShowing();
+
+ // Notification that some of our content has changed size as
+ // part of an animation.
+ void ToolbarSizeChanged(bool is_animating);
// Replaces the state of the currently selected tab with the session
// history restored from the SessionRestore system.
@@ -366,14 +390,29 @@ class Browser : public TabStripModelDelegate,
static Browser* GetBrowserForController(
const NavigationController* controller, int* index);
+
+ // Helper function to create a new popup window.
+ static void BuildPopupWindowHelper(TabContents* source,
+ TabContents* new_contents,
+ const gfx::Rect& initial_pos,
+ Browser::Type browser_type,
+ Profile* profile,
+ bool honor_saved_maximized_state);
+
// Calls ExecuteCommandWithDisposition with the given disposition.
void ExecuteCommandWithDisposition(int id, WindowOpenDisposition);
// Interface implementations ////////////////////////////////////////////////
+ // Overridden from PageNavigator
+ virtual void OpenURL(const GURL& url, const GURL& referrer,
+ WindowOpenDisposition disposition,
+ PageTransition::Type transition);
+
// Overridden from CommandUpdater::CommandUpdaterDelegate:
virtual void ExecuteCommand(int id);
+ private:
// Overridden from TabStripModelDelegate:
virtual TabContents* AddBlankTab(bool foreground);
virtual TabContents* AddBlankTabAt(int index, bool foreground);
@@ -458,15 +497,6 @@ class Browser : public TabStripModelDelegate,
const NotificationSource& source,
const NotificationDetails& details);
- // Helper function to create a new popup window.
- static void BuildPopupWindowHelper(TabContents* source,
- TabContents* new_contents,
- const gfx::Rect& initial_pos,
- Browser::Type browser_type,
- Profile* profile,
- bool honor_saved_maximized_state);
-
- private:
// Command and state updating ///////////////////////////////////////////////
// Initialize state for all browser commands.