diff options
author | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-04 20:53:19 +0000 |
---|---|---|
committer | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-04 20:53:19 +0000 |
commit | 10f27fb06b2d231f8ab3bb0177439760d9a3b654 (patch) | |
tree | 7cce1bb2c90dc61e2228ea2e25edd88ef346d986 /chrome/browser/views/html_dialog_view.h | |
parent | 72dc92dc4f37783ba4aedae7d2d9c1750fac999e (diff) | |
download | chromium_src-10f27fb06b2d231f8ab3bb0177439760d9a3b654.zip chromium_src-10f27fb06b2d231f8ab3bb0177439760d9a3b654.tar.gz chromium_src-10f27fb06b2d231f8ab3bb0177439760d9a3b654.tar.bz2 |
Undo part of brettw's WebContents refactor that removed TabContentsDelegate
code from HtmlDialogView.
BUG=http://code.google.com/p/chromium/issues/detail?id=9884
Review URL: http://codereview.chromium.org/99305
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15238 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/html_dialog_view.h')
-rw-r--r-- | chrome/browser/views/html_dialog_view.h | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/chrome/browser/views/html_dialog_view.h b/chrome/browser/views/html_dialog_view.h index b886d1e..0043252 100644 --- a/chrome/browser/views/html_dialog_view.h +++ b/chrome/browser/views/html_dialog_view.h @@ -29,11 +29,11 @@ class Window; //////////////////////////////////////////////////////////////////////////////// class HtmlDialogView : public DOMView, + public TabContentsDelegate, public HtmlDialogUIDelegate, public views::WindowDelegate { public: - HtmlDialogView(Profile* profile, - HtmlDialogUIDelegate* delegate); + HtmlDialogView(Browser* parent_browser, HtmlDialogUIDelegate* delegate); virtual ~HtmlDialogView(); // Initializes the contents of the dialog (the DOMView and the callbacks). @@ -57,7 +57,36 @@ class HtmlDialogView virtual void GetDialogSize(gfx::Size* size) const; virtual std::string GetDialogArgs() const; virtual void OnDialogClosed(const std::string& json_retval); + + // Overridden from TabContentsDelegate: + virtual void OpenURLFromTab(TabContents* source, + const GURL& url, + const GURL& referrer, + WindowOpenDisposition disposition, + PageTransition::Type transition); + virtual void NavigationStateChanged(const TabContents* source, + unsigned changed_flags); + virtual void ReplaceContents(TabContents* source, + TabContents* new_contents); + virtual void AddNewContents(TabContents* source, + TabContents* new_contents, + WindowOpenDisposition disposition, + const gfx::Rect& initial_pos, + bool user_gesture); + virtual void ActivateContents(TabContents* contents); + virtual void LoadingStateChanged(TabContents* source); + virtual void CloseContents(TabContents* source); + virtual void MoveContents(TabContents* source, const gfx::Rect& pos); + virtual bool IsPopup(TabContents* source); + virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); + virtual void URLStarredChanged(TabContents* source, bool starred); + virtual void UpdateTargetURL(TabContents* source, const GURL& url); + private: + // The Browser object which created this html dialog; we send all + // window opening/navigations to this object. + Browser* parent_browser_; + Profile* profile_; // This view is a delegate to the HTML content since it needs to get notified |