summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.cc
diff options
context:
space:
mode:
authormad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-09 20:10:17 +0000
committermad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-09 20:10:17 +0000
commitc3826037cbcb22fe784a10589061eaf084818727 (patch)
tree58da3c893c97e0fd5fee5df93f3dc30db7b93a40 /chrome/browser/browser.cc
parentb595ba77947ee0881ae8ce16ee92b47d1c48f10a (diff)
downloadchromium_src-c3826037cbcb22fe784a10589061eaf084818727.zip
chromium_src-c3826037cbcb22fe784a10589061eaf084818727.tar.gz
chromium_src-c3826037cbcb22fe784a10589061eaf084818727.tar.bz2
Add a new resizer corner.
To display a resize bitmap and handle the mouse interactions as requested in http://code.google.com/p/chromium/issues/detail?id=458. BUG=458 There are unfortunately two cases to handle and they must be handled separately. The first one is when there are no bottom shelf like the download bar, and the case where there is one. For the case without, we must draw on top of what we receive from WebKit, so we intercept the bitmap in RenderWidgetHostViewWin::OnPaint() so that we can draw the resize corner bitmap on top of it (taking into account whether we are in a right to left language or not). For the case where we have a bottom shelf, we use a dedicated view that we properly layout on top of the bottom shelf view (which takes care of handling the RTL language case for us). Same split for the mouse interactions. Without the bottom shelf, we must deal with it in RenderWidgetHostViewWin::OnMouseEvent() by sending the root window a WM_NCLBUTTONDOWN message with either HTBOTTOMRIGHT or HTBOTTOMLEFT (based on the RTL setting) and let the OS take care of the resizing. IF we have a bottom shelf, we must deal with the mouse interaction in BrowserView::NonClientHitTest() to either return HTBOTTOMRIGHT or HTBOTTOMLEFT (again, based on the RTL setting) and, again, let the OS take care of the resizing. More details here: http://code.google.com/p/chromium/wiki/BrowserViewResizer git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9408 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r--chrome/browser/browser.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index e9c48f1..8b6af85 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -1089,7 +1089,7 @@ void Browser::ExecuteCommand(int id) {
case IDC_NEW_WINDOW_PROFILE_5:
case IDC_NEW_WINDOW_PROFILE_6:
case IDC_NEW_WINDOW_PROFILE_7:
- case IDC_NEW_WINDOW_PROFILE_8:
+ case IDC_NEW_WINDOW_PROFILE_8:
NewProfileWindowByIndex(id - IDC_NEW_WINDOW_PROFILE_0); break;
#if defined(OS_WIN)
case IDC_CLOSE_WINDOW: CloseWindow(); break;
@@ -1372,7 +1372,7 @@ bool Browser::RunUnloadListenerBeforeClosing(TabContents* contents) {
if (web_contents) {
// If the WebContents is not connected yet, then there's no unload
// handler we can fire even if the WebContents has an unload listener.
- // One case where we hit this is in a tab that has an infinite loop
+ // One case where we hit this is in a tab that has an infinite loop
// before load.
if (TabHasUnloadListener(contents)) {
// If the page has unload listeners, then we tell the renderer to fire
@@ -1874,6 +1874,10 @@ void Browser::BeforeUnloadFired(TabContents* tab,
*proceed_to_fire_unload = true;
}
+gfx::Rect Browser::GetRootWindowResizerRect() const {
+ return window_->GetRootWindowResizerRect();
+}
+
void Browser::ShowHtmlDialog(HtmlDialogContentsDelegate* delegate,
void* parent_window) {
window_->ShowHTMLDialog(delegate, parent_window);