summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/frame
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 22:01:00 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 22:01:00 +0000
commit30f75e618e08b5bd943feec72261cc36a8fd9280 (patch)
tree7f108ae961dc8ff5b11f904bdbc4894247f2c7c0 /chrome/browser/views/frame
parente191c147e4704d4e75f548cdaf90f914d196aa63 (diff)
downloadchromium_src-30f75e618e08b5bd943feec72261cc36a8fd9280.zip
chromium_src-30f75e618e08b5bd943feec72261cc36a8fd9280.tar.gz
chromium_src-30f75e618e08b5bd943feec72261cc36a8fd9280.tar.bz2
This CL causes the autofill popup to hide when the browser window is moved or resized.
TEST=Bring up an autofill popup in a form, move the browser. The autofill popup should be closed. BUG=7401 R=ben Review URL: http://codereview.chromium.org/28126 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10384 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/frame')
-rw-r--r--chrome/browser/views/frame/aero_glass_frame.cc4
-rw-r--r--chrome/browser/views/frame/aero_glass_frame.h1
-rw-r--r--chrome/browser/views/frame/browser_view.cc6
-rw-r--r--chrome/browser/views/frame/browser_view.h4
-rw-r--r--chrome/browser/views/frame/opaque_frame.cc4
-rw-r--r--chrome/browser/views/frame/opaque_frame.h1
6 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/views/frame/aero_glass_frame.cc b/chrome/browser/views/frame/aero_glass_frame.cc
index 67d40d2..d51b69c 100644
--- a/chrome/browser/views/frame/aero_glass_frame.cc
+++ b/chrome/browser/views/frame/aero_glass_frame.cc
@@ -105,6 +105,10 @@ void AeroGlassFrame::OnInitMenuPopup(HMENU menu, UINT position,
browser_view_->PrepareToRunSystemMenu(menu);
}
+void AeroGlassFrame::OnEnterSizeMove() {
+ browser_view_->WindowMoveOrResizeStarted();
+}
+
void AeroGlassFrame::OnEndSession(BOOL ending, UINT logoff) {
BrowserList::WindowsSessionEnding();
}
diff --git a/chrome/browser/views/frame/aero_glass_frame.h b/chrome/browser/views/frame/aero_glass_frame.h
index 2541467..4c7e2f8 100644
--- a/chrome/browser/views/frame/aero_glass_frame.h
+++ b/chrome/browser/views/frame/aero_glass_frame.h
@@ -44,6 +44,7 @@ class AeroGlassFrame : public BrowserFrame,
virtual bool AcceleratorPressed(views::Accelerator* accelerator);
virtual bool GetAccelerator(int cmd_id, views::Accelerator* accelerator);
virtual void OnInitMenuPopup(HMENU menu, UINT position, BOOL is_system_menu);
+ virtual void OnEnterSizeMove();
virtual void OnEndSession(BOOL ending, UINT logoff);
virtual LRESULT OnMouseActivate(HWND window,
UINT hittest_code,
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 898a147..d1aae0b 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -247,6 +247,12 @@ void BrowserView::WindowMoved() {
toolbar_->GetLocationBarView()->location_entry()->ClosePopup();
}
+void BrowserView::WindowMoveOrResizeStarted() {
+ TabContents* tab_contents = GetSelectedTabContents();
+ if (tab_contents && tab_contents->AsWebContents())
+ tab_contents->AsWebContents()->WindowMoveOrResizeStarted();
+}
+
gfx::Rect BrowserView::GetToolbarBounds() const {
return toolbar_->bounds();
}
diff --git a/chrome/browser/views/frame/browser_view.h b/chrome/browser/views/frame/browser_view.h
index c2af520..12634b9 100644
--- a/chrome/browser/views/frame/browser_view.h
+++ b/chrome/browser/views/frame/browser_view.h
@@ -68,6 +68,10 @@ class BrowserView : public BrowserWindow,
// any dependent popup windows should be repositioned.
void WindowMoved();
+ // Called by the frame to notify the BrowserView that a move or resize was
+ // initiated.
+ void WindowMoveOrResizeStarted();
+
// Returns the bounds of the toolbar, in BrowserView coordinates.
gfx::Rect GetToolbarBounds() const;
diff --git a/chrome/browser/views/frame/opaque_frame.cc b/chrome/browser/views/frame/opaque_frame.cc
index 5895418..066bcad 100644
--- a/chrome/browser/views/frame/opaque_frame.cc
+++ b/chrome/browser/views/frame/opaque_frame.cc
@@ -89,6 +89,10 @@ void OpaqueFrame::OnEndSession(BOOL ending, UINT logoff) {
BrowserList::WindowsSessionEnding();
}
+void OpaqueFrame::OnEnterSizeMove() {
+ browser_view_->WindowMoveOrResizeStarted();
+}
+
void OpaqueFrame::OnInitMenuPopup(HMENU menu, UINT position,
BOOL is_system_menu) {
browser_view_->PrepareToRunSystemMenu(menu);
diff --git a/chrome/browser/views/frame/opaque_frame.h b/chrome/browser/views/frame/opaque_frame.h
index 8a02595..7042002 100644
--- a/chrome/browser/views/frame/opaque_frame.h
+++ b/chrome/browser/views/frame/opaque_frame.h
@@ -49,6 +49,7 @@ class OpaqueFrame : public BrowserFrame,
// Overridden from views::WidgetWin:
virtual bool AcceleratorPressed(views::Accelerator* accelerator);
virtual bool GetAccelerator(int cmd_id, views::Accelerator* accelerator);
+ virtual void OnEnterSizeMove();
virtual void OnEndSession(BOOL ending, UINT logoff);
virtual void OnInitMenuPopup(HMENU menu, UINT position, BOOL is_system_menu);
virtual LRESULT OnMouseActivate(HWND window,