diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-04 00:19:59 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-04 00:19:59 +0000 |
commit | 8b6384271101aa16e3764ba0c927426e7966ea91 (patch) | |
tree | 8402b201190fdd2cb1074de95dd1ab9b3c51fc4a /chrome/browser/views/frame | |
parent | 3dca25ec097f4fb340df49d38ca1ff85805603aa (diff) | |
download | chromium_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/views/frame')
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 7 | ||||
-rw-r--r-- | chrome/browser/views/frame/browser_view.h | 4 | ||||
-rw-r--r-- | chrome/browser/views/frame/browser_view2.cc | 35 | ||||
-rw-r--r-- | chrome/browser/views/frame/browser_view2.h | 4 |
4 files changed, 0 insertions, 50 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index cc415ec..36ea812 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -113,12 +113,6 @@ void BrowserView::ShowTabContents(TabContents* contents) { frame_->ShowTabContents(contents); } -void BrowserView::ContinueDetachConstrainedWindowDrag( - const gfx::Point& mouse_pt, - int frame_component) { - frame_->ContinueDetachConstrainedWindowDrag(mouse_pt, frame_component); -} - void BrowserView::SizeToContents(const gfx::Rect& contents_bounds) { frame_->SizeToContents(contents_bounds); } @@ -231,4 +225,3 @@ void BrowserView::ViewHierarchyChanged(bool is_add, initialized_ = true; } } - diff --git a/chrome/browser/views/frame/browser_view.h b/chrome/browser/views/frame/browser_view.h index 5d81317..a83d08a 100644 --- a/chrome/browser/views/frame/browser_view.h +++ b/chrome/browser/views/frame/browser_view.h @@ -48,9 +48,6 @@ class BrowserView : public BrowserWindow, virtual void Activate(); virtual void FlashFrame(); virtual void ShowTabContents(TabContents* contents); - virtual void ContinueDetachConstrainedWindowDrag( - const gfx::Point& mouse_pt, - int frame_component); virtual void SizeToContents(const gfx::Rect& contents_bounds); virtual void SetAcceleratorTable( std::map<views::Accelerator, int>* accelerator_table); @@ -105,4 +102,3 @@ class BrowserView : public BrowserWindow, }; #endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ - diff --git a/chrome/browser/views/frame/browser_view2.cc b/chrome/browser/views/frame/browser_view2.cc index 477a910..7081665 100644 --- a/chrome/browser/views/frame/browser_view2.cc +++ b/chrome/browser/views/frame/browser_view2.cc @@ -351,40 +351,6 @@ void BrowserView2::FlashFrame() { FlashWindowEx(&fwi); } -void BrowserView2::ContinueDetachConstrainedWindowDrag( - const gfx::Point& mouse_point, - int frame_component) { - HWND vc_hwnd = GetContainer()->GetHWND(); - if (frame_component == HTCLIENT) { - // If the user's mouse was over the content area of the popup when they - // clicked down, we need to re-play the mouse down event so as to actually - // send the click to the renderer. If we don't do this, the user needs to - // click again once the window is detached to interact. - HWND inner_hwnd = browser_->GetSelectedTabContents()->GetContentHWND(); - POINT window_point = mouse_point.ToPOINT(); - MapWindowPoints(HWND_DESKTOP, inner_hwnd, &window_point, 1); - PostMessage(inner_hwnd, WM_LBUTTONDOWN, MK_LBUTTON, - MAKELPARAM(window_point.x, window_point.y)); - } else if (frame_component != HTNOWHERE) { - // The user's mouse is already moving, and the left button is down, but we - // need to start moving this frame, so we _post_ it a NCLBUTTONDOWN message - // with the corresponding frame component as supplied by the constrained - // window where the user clicked. This tricks Windows into believing the - // user just started performing that operation on the newly created window. - // All the frame moving and sizing is then handled automatically by - // Windows. We use PostMessage because we need to return to the message - // loop first for Windows' built in moving/sizing to be triggered. - POINTS pts; - pts.x = mouse_point.x(); - pts.y = mouse_point.y(); - PostMessage(vc_hwnd, WM_NCLBUTTONDOWN, frame_component, - reinterpret_cast<LPARAM>(&pts)); - // Also make sure the right cursor for the action is set. - PostMessage(vc_hwnd, WM_SETCURSOR, reinterpret_cast<WPARAM>(vc_hwnd), - frame_component); - } -} - void BrowserView2::SizeToContents(const gfx::Rect& contents_bounds) { frame_->SizeToContents(contents_bounds); } @@ -1192,4 +1158,3 @@ void BrowserView2::InitClass() { initialized = true; } } - diff --git a/chrome/browser/views/frame/browser_view2.h b/chrome/browser/views/frame/browser_view2.h index a2d65f7..1399f65 100644 --- a/chrome/browser/views/frame/browser_view2.h +++ b/chrome/browser/views/frame/browser_view2.h @@ -141,9 +141,6 @@ class BrowserView2 : public BrowserWindow, virtual void UpdateTitleBar(); virtual void Activate(); virtual void FlashFrame(); - virtual void ContinueDetachConstrainedWindowDrag( - const gfx::Point& mouse_point, - int frame_component); virtual void SizeToContents(const gfx::Rect& contents_bounds); virtual void SetAcceleratorTable( std::map<views::Accelerator, int>* accelerator_table); @@ -371,4 +368,3 @@ class BrowserView2 : public BrowserWindow, }; #endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW2_H_ - |