summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorgregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-26 02:22:17 +0000
committergregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-26 02:22:17 +0000
commit37e1bb64e696f39acb8a80021af58356af8e3bf1 (patch)
tree32b249c3356c2620b5d22858e3c19c14a430955e /webkit
parent8e8503072f1bf91c59b15b54274ec907505b0376 (diff)
downloadchromium_src-37e1bb64e696f39acb8a80021af58356af8e3bf1.zip
chromium_src-37e1bb64e696f39acb8a80021af58356af8e3bf1.tar.gz
chromium_src-37e1bb64e696f39acb8a80021af58356af8e3bf1.tar.bz2
Revert 27315 - First step towards NaClChrome integration:1. NaCl plugin becomes a builtin plugin in Chrome and runs in the renderer process.2. Most of the changes are related to launching the NaCl process (that loads and runs the NaCl module) and establishing the initial communication between that process and the NaCl plugin.3. Command line flag "internalnacl" is required to enable the builtin NaCl plugin. NaCl still cannot run in Chrome sandbox, the flag automatically disables the sandbox
Review URL: http://codereview.chromium.org/153002 TBR=gregoryd@google.com Review URL: http://codereview.chromium.org/244014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27317 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/plugin_lib.h4
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_win.cc51
2 files changed, 24 insertions, 31 deletions
diff --git a/webkit/glue/plugins/plugin_lib.h b/webkit/glue/plugins/plugin_lib.h
index 16513af..ed523c12 100644
--- a/webkit/glue/plugins/plugin_lib.h
+++ b/webkit/glue/plugins/plugin_lib.h
@@ -61,8 +61,6 @@ class PluginLib : public base::RefCounted<PluginLib> {
// supports.
const WebPluginInfo& plugin_info() { return web_plugin_info_; }
- bool internal() { return internal_; }
-
//
// NPAPI functions
//
@@ -93,7 +91,7 @@ class PluginLib : public base::RefCounted<PluginLib> {
void Shutdown();
private:
- bool internal_; // True for plugins that are built-in into chrome.dll
+ bool internal_; // Whether this an internal plugin.
WebPluginInfo web_plugin_info_; // supported mime types, description
base::NativeLibrary library_; // the opened library reference
NPPluginFuncs plugin_funcs_; // the struct of plugin side functions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_win.cc b/webkit/glue/plugins/webplugin_delegate_impl_win.cc
index 9d8ed45..1f13cf8 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_win.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl_win.cc
@@ -326,40 +326,35 @@ void WebPluginDelegateImpl::PluginDestroyed() {
void WebPluginDelegateImpl::PlatformInitialize() {
plugin_->SetWindow(windowed_handle_);
-
- if (windowless_ && !instance_->plugin_lib()->internal()) {
+ if (windowless_) {
CreateDummyWindowForActivation();
handle_event_pump_messages_event_ = CreateEvent(NULL, TRUE, FALSE, NULL);
plugin_->SetWindowlessPumpEvent(handle_event_pump_messages_event_);
}
- // We cannot patch internal plugins as they are not shared libraries.
- if (!instance_->plugin_lib()->internal()) {
- // Windowless plugins call the WindowFromPoint API and passes the result of
- // that to the TrackPopupMenu API call as the owner window. This causes the
- // API to fail as the API expects the window handle to live on the same
- // thread as the caller. It works in the other browsers as the plugin lives
- // on the browser thread. Our workaround is to intercept the TrackPopupMenu
- // API and replace the window handle with the dummy activation window.
- if (windowless_ && !g_iat_patch_track_popup_menu.Pointer()->is_patched()) {
- g_iat_patch_track_popup_menu.Pointer()->Patch(
- GetPluginPath().value().c_str(), "user32.dll", "TrackPopupMenu",
- WebPluginDelegateImpl::TrackPopupMenuPatch);
- }
+ // Windowless plugins call the WindowFromPoint API and passes the result of
+ // that to the TrackPopupMenu API call as the owner window. This causes the
+ // API to fail as the API expects the window handle to live on the same thread
+ // as the caller. It works in the other browsers as the plugin lives on the
+ // browser thread. Our workaround is to intercept the TrackPopupMenu API and
+ // replace the window handle with the dummy activation window.
+ if (windowless_ && !g_iat_patch_track_popup_menu.Pointer()->is_patched()) {
+ g_iat_patch_track_popup_menu.Pointer()->Patch(
+ GetPluginPath().value().c_str(), "user32.dll", "TrackPopupMenu",
+ WebPluginDelegateImpl::TrackPopupMenuPatch);
+ }
- // Windowless plugins can set cursors by calling the SetCursor API. This
- // works because the thread inputs of the browser UI thread and the plugin
- // thread are attached. We intercept the SetCursor API for windowless
- // plugins and remember the cursor being set. This is shipped over to the
- // browser in the HandleEvent call, which ensures that the cursor does not
- // change when a windowless plugin instance changes the cursor
- // in a background tab.
- if (windowless_ && !g_iat_patch_set_cursor.Pointer()->is_patched() &&
- (quirks_ & PLUGIN_QUIRK_PATCH_SETCURSOR)) {
- g_iat_patch_set_cursor.Pointer()->Patch(
- GetPluginPath().value().c_str(), "user32.dll", "SetCursor",
- WebPluginDelegateImpl::SetCursorPatch);
- }
+ // Windowless plugins can set cursors by calling the SetCursor API. This
+ // works because the thread inputs of the browser UI thread and the plugin
+ // thread are attached. We intercept the SetCursor API for windowless plugins
+ // and remember the cursor being set. This is shipped over to the browser
+ // in the HandleEvent call, which ensures that the cursor does not change
+ // when a windowless plugin instance changes the cursor in a background tab.
+ if (windowless_ && !g_iat_patch_set_cursor.Pointer()->is_patched() &&
+ (quirks_ & PLUGIN_QUIRK_PATCH_SETCURSOR)) {
+ g_iat_patch_set_cursor.Pointer()->Patch(
+ GetPluginPath().value().c_str(), "user32.dll", "SetCursor",
+ WebPluginDelegateImpl::SetCursorPatch);
}
// On XP, WMP will use its old UI unless a registry key under HKLM has the