summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents.h
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-04 00:19:59 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-04 00:19:59 +0000
commit8b6384271101aa16e3764ba0c927426e7966ea91 (patch)
tree8402b201190fdd2cb1074de95dd1ab9b3c51fc4a /chrome/browser/tab_contents.h
parent3dca25ec097f4fb340df49d38ca1ff85805603aa (diff)
downloadchromium_src-8b6384271101aa16e3764ba0c927426e7966ea91.zip
chromium_src-8b6384271101aa16e3764ba0c927426e7966ea91.tar.gz
chromium_src-8b6384271101aa16e3764ba0c927426e7966ea91.tar.bz2
Redo how we block popups. Rip out the old constrained popup window cruft (while leaving the HTTP authentication dialog support) and add a new type of constrained window which owns all blocked popups. Rip out dead unit tests.
Review URL: http://codereview.chromium.org/8782 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4523 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents.h')
-rw-r--r--chrome/browser/tab_contents.h31
1 files changed, 11 insertions, 20 deletions
diff --git a/chrome/browser/tab_contents.h b/chrome/browser/tab_contents.h
index 54a9e45..f4d981e 100644
--- a/chrome/browser/tab_contents.h
+++ b/chrome/browser/tab_contents.h
@@ -23,6 +23,7 @@ namespace views {
class WindowDelegate;
}
+class BlockedPopupContainer;
class DOMUIHost;
class DownloadItem;
class DownloadShelfView;
@@ -52,8 +53,7 @@ class WebContents;
// the NavigationController makes the active TabContents inactive, notifies the
// TabContentsDelegate that the TabContents is being replaced, and then
// activates the new TabContents.
-class TabContents : public PageNavigator,
- public ConstrainedTabContentsDelegate {
+class TabContents : public PageNavigator {
public:
// Flags passed to the TabContentsDelegate.NavigationStateChanged to tell it
// what has changed. Combine them to update more than one thing.
@@ -411,25 +411,11 @@ class TabContents : public PageNavigator,
// want to generalize this if we need to migrate some other state.
static void MigrateShelfView(TabContents* from, TabContents* to);
- // ConstrainedTabContentsDelegate --------------------------------------------
+ // Called when a ConstrainedWindow we own is about to be closed.
+ void WillClose(ConstrainedWindow* window);
- virtual void AddNewContents(ConstrainedWindow* window,
- TabContents* contents,
- WindowOpenDisposition disposition,
- const gfx::Rect& initial_pos,
- bool user_gesture);
- virtual void OpenURL(ConstrainedWindow* window,
- const GURL& url,
- const GURL& referrer,
- WindowOpenDisposition disposition,
- PageTransition::Type transition);
- virtual void WillClose(ConstrainedWindow* window);
- virtual void DetachContents(ConstrainedWindow* window,
- TabContents* contents,
- const gfx::Rect& contents_bounds,
- const gfx::Point& mouse_pt,
- int frame_component);
- virtual void DidMoveOrResize(ConstrainedWindow* window);
+ // Called when a ConstrainedWindow we own is moved or resized.
+ void DidMoveOrResize(ConstrainedWindow* window);
protected:
friend class NavigationController;
@@ -517,6 +503,11 @@ class TabContents : public PageNavigator,
// See capturing_contents() above.
bool capturing_contents_;
+ // ConstrainedWindow with additional methods for managing blocked
+ // popups. This pointer alsog goes in |child_windows_| for ownership,
+ // repositioning, etc.
+ BlockedPopupContainer* blocked_popups_;
+
DISALLOW_COPY_AND_ASSIGN(TabContents);
};