Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9623)

Unified Diff: chrome/browser/plugin_carbon_interpose_mac.cc

Issue 257008: Fix several issues around fullscreen Mac plugins:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/plugin_process_host.h » ('j') | chrome/browser/plugin_process_host_mac.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_carbon_interpose_mac.cc
===================================================================
--- chrome/browser/plugin_carbon_interpose_mac.cc (revision 27721)
+++ chrome/browser/plugin_carbon_interpose_mac.cc (working copy)
@@ -4,8 +4,18 @@
#include <Carbon/Carbon.h>
+#include "base/gfx/rect.h"
#include "webkit/glue/plugins/fake_plugin_window_tracker_mac.h"
+namespace webkit_glue {
+
+void NotifyBrowserOfPluginSelectWindow(uint32 window_id, CGRect bounds);
+void NotifyBrowserOfPluginShowWindow(uint32 window_id, CGRect bounds);
+void NotifyBrowserOfPluginHideWindow(uint32 window_id, CGRect bounds);
+void NotifyBrowserOfPluginDisposeWindow(uint32 window_id, CGRect bounds);
+
+}
+
// The process that was frontmost when a plugin created a new window; generally
// we expect this to be the browser UI process.
static ProcessSerialNumber g_saved_front_process = { 0, 0 };
@@ -64,23 +74,38 @@
return isHilited;
}
+static CGRect CGRectForWindow(WindowRef window) {
+ CGRect bounds = { { 0, 0 }, { 0, 0 } };
+ HIWindowGetBounds(window, kWindowContentRgn, kHICoordSpace72DPIGlobal,
+ &bounds);
+ return bounds;
+}
+
static void ChromePluginSelectWindow(WindowRef window) {
SwitchToPluginProcess();
SelectWindow(window);
+ webkit_glue::NotifyBrowserOfPluginSelectWindow(HIWindowGetCGWindowID(window),
+ CGRectForWindow(window));
}
static void ChromePluginShowWindow(WindowRef window) {
SwitchToPluginProcess();
ShowWindow(window);
+ webkit_glue::NotifyBrowserOfPluginShowWindow(HIWindowGetCGWindowID(window),
+ CGRectForWindow(window));
}
static void ChromePluginDisposeWindow(WindowRef window) {
SwitchToSavedProcess();
+ webkit_glue::NotifyBrowserOfPluginDisposeWindow(HIWindowGetCGWindowID(window),
+ CGRectForWindow(window));
DisposeWindow(window);
}
static void ChromePluginHideWindow(WindowRef window) {
SwitchToSavedProcess();
+ webkit_glue::NotifyBrowserOfPluginHideWindow(HIWindowGetCGWindowID(window),
+ CGRectForWindow(window));
HideWindow(window);
}
« no previous file with comments | « no previous file | chrome/browser/plugin_process_host.h » ('j') | chrome/browser/plugin_process_host_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698