summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-18 19:55:07 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-18 19:55:07 +0000
commit08de1439dfbd60d18b799a085801c473c31ba2cc (patch)
tree590e5d2f0b5c32ba17b479f4c23ec909c96d8709 /chrome/browser/cocoa
parent46b6dddb1ef14089a336174b5e9f73c166400b8b (diff)
downloadchromium_src-08de1439dfbd60d18b799a085801c473c31ba2cc.zip
chromium_src-08de1439dfbd60d18b799a085801c473c31ba2cc.tar.gz
chromium_src-08de1439dfbd60d18b799a085801c473c31ba2cc.tar.bz2
Fix mouse handling extension-hosted plugins on the Mac
BUG=42032 TEST=Flash-hosting extensions should respond to clicks. Review URL: http://codereview.chromium.org/2873004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50272 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa')
-rw-r--r--chrome/browser/cocoa/extension_view_mac.h3
-rw-r--r--chrome/browser/cocoa/extension_view_mac.mm5
-rw-r--r--chrome/browser/cocoa/extensions/extension_popup_controller.mm12
3 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/extension_view_mac.h b/chrome/browser/cocoa/extension_view_mac.h
index 34885c2..74152ff 100644
--- a/chrome/browser/cocoa/extension_view_mac.h
+++ b/chrome/browser/cocoa/extension_view_mac.h
@@ -49,6 +49,9 @@ class ExtensionViewMac {
// connection.
void RenderViewCreated();
+ // Informs the view that its containing window's frame changed.
+ void WindowFrameChanged();
+
// The minimum/maximum dimensions of the popup.
// The minimum is just a little larger than the size of the button itself.
// The maximum is an arbitrary number that should be smaller than most
diff --git a/chrome/browser/cocoa/extension_view_mac.mm b/chrome/browser/cocoa/extension_view_mac.mm
index 221e428..6134fcf 100644
--- a/chrome/browser/cocoa/extension_view_mac.mm
+++ b/chrome/browser/cocoa/extension_view_mac.mm
@@ -94,6 +94,11 @@ void ExtensionViewMac::RenderViewCreated() {
}
}
+void ExtensionViewMac::WindowFrameChanged() {
+ if (render_widget_host_view_)
+ render_widget_host_view_->WindowFrameChanged();
+}
+
void ExtensionViewMac::CreateWidgetHostView() {
DCHECK(!render_widget_host_view_);
render_widget_host_view_ = new RenderWidgetHostViewMac(render_view_host());
diff --git a/chrome/browser/cocoa/extensions/extension_popup_controller.mm b/chrome/browser/cocoa/extensions/extension_popup_controller.mm
index 90413b8..d7a4a66 100644
--- a/chrome/browser/cocoa/extensions/extension_popup_controller.mm
+++ b/chrome/browser/cocoa/extensions/extension_popup_controller.mm
@@ -311,6 +311,18 @@ class DevtoolsNotificationBridge : public NotificationObserver {
[[self window] makeKeyAndOrderFront:self];
}
+- (void)windowDidResize:(NSNotification*)notification {
+ // Let the extension view know, so that it can tell plugins.
+ if (host_->view())
+ host_->view()->WindowFrameChanged();
+}
+
+- (void)windowDidMove:(NSNotification*)notification {
+ // Let the extension view know, so that it can tell plugins.
+ if (host_->view())
+ host_->view()->WindowFrameChanged();
+}
+
// Private (TestingAPI)
- (NSView*)view {
return extensionView_;