diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-05 19:03:25 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-05 19:03:25 +0000 |
commit | d6598c050acb33ef7a64d32b116a6f10ba941329 (patch) | |
tree | 3e1e01c8a79b9e787f39fae834853b123d546276 /chrome/browser/views/frame | |
parent | 49a608d55bdb77491ea5dfe605a924fd1cb88d63 (diff) | |
download | chromium_src-d6598c050acb33ef7a64d32b116a6f10ba941329.zip chromium_src-d6598c050acb33ef7a64d32b116a6f10ba941329.tar.gz chromium_src-d6598c050acb33ef7a64d32b116a6f10ba941329.tar.bz2 |
This is r4523, with a few changes to make things work under Vista.
- Explicitly set_delegate(NULL) before releasing a TabContents. (I think
the order messages are getting handled is different from XP; this only
seems neccessary under Vista.)
- r4523 and someone elses change added entries to theme_resources.rc at
roughly the same time, causing happy fun crashes.
- Roll in sgk's SConscript fix.
Review URL: http://codereview.chromium.org/9373
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4799 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_ - |