summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-14 20:07:29 +0000
committerbeng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-14 20:07:29 +0000
commit6322965c27dc59aad2ca6b4c22f30e30c460da67 (patch)
tree4d317f5ef3c3b1e7d4b28873c8df6ad82227088e /chrome/browser
parente9ba44740c88677d8b566583f7041d1dd33b6a9d (diff)
downloadchromium_src-6322965c27dc59aad2ca6b4c22f30e30c460da67.zip
chromium_src-6322965c27dc59aad2ca6b4c22f30e30c460da67.tar.gz
chromium_src-6322965c27dc59aad2ca6b4c22f30e30c460da67.tar.bz2
Include the area to the right of the tabstrip underneath the window controls in the window caption area.
B=1031854 Review URL: http://codereview.chromium.org/2840 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/views/frame/browser_view2.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/chrome/browser/views/frame/browser_view2.cc b/chrome/browser/views/frame/browser_view2.cc
index d0d724c..c0e067b 100644
--- a/chrome/browser/views/frame/browser_view2.cc
+++ b/chrome/browser/views/frame/browser_view2.cc
@@ -20,10 +20,12 @@
#include "chrome/browser/views/toolbar_view.h"
#include "chrome/common/drag_drop_types.h"
#include "chrome/common/l10n_util.h"
+#include "chrome/common/notification_service.h"
#include "chrome/common/os_exchange_data.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/resource_bundle.h"
#include "chrome/common/win_util.h"
+#include "chrome/views/hwnd_notification_source.h"
#include "chrome/views/view.h"
#include "chrome/views/window.h"
@@ -677,12 +679,9 @@ bool BrowserView2::CanClose() const {
}
// Empty TabStripModel, it's now safe to allow the Window to be closed.
- /*
- // TODO(beng): for some reason, this won't compile. Figure it out.
NotificationService::current()->Notify(
NOTIFY_WINDOW_CLOSED, Source<HWND>(frame_->GetWindow()->GetHWND()),
NotificationService::NoDetails());
- */
return true;
}
@@ -730,6 +729,15 @@ int BrowserView2::NonClientHitTest(const gfx::Point& point) {
if (gfx::Rect(bounds).Contains(point.x(), point.y()))
return HTCLIENT;
+ // If the point's y coordinate is above the top of the toolbar, but not in
+ // the tabstrip (per previous checking in this function), then we consider it
+ // in the window caption (e.g. the area to the right of the tabstrip
+ // underneath the window controls).
+ GetBounds(&bounds);
+ bounds.bottom = GetY() + toolbar_->GetY();
+ if (gfx::Rect(bounds).Contains(point.x(), point.y()))
+ return HTCAPTION;
+
// If the point is somewhere else, delegate to the default implementation.
return ClientView::NonClientHitTest(point);
}