diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-14 22:16:10 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-14 22:16:10 +0000 |
commit | 105303e5d9bf528bb4163312b2fd318f218dd33b (patch) | |
tree | b3d63276044578d8902df4b5a11bba688deafd20 /chrome | |
parent | 74c2d8475aa9e4b4aa5a574ce9fb80d0a411df4a (diff) | |
download | chromium_src-105303e5d9bf528bb4163312b2fd318f218dd33b.zip chromium_src-105303e5d9bf528bb4163312b2fd318f218dd33b.tar.gz chromium_src-105303e5d9bf528bb4163312b2fd318f218dd33b.tar.bz2 |
Move plugin messages to content.
TBR=tsepez
Review URL: http://codereview.chromium.org/6682033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
24 files changed, 17 insertions, 1117 deletions
diff --git a/chrome/browser/plugin_data_remover.cc b/chrome/browser/plugin_data_remover.cc index 39b8019..d4c1cef 100644 --- a/chrome/browser/plugin_data_remover.cc +++ b/chrome/browser/plugin_data_remover.cc @@ -9,9 +9,9 @@ #include "base/metrics/histogram.h" #include "base/version.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/plugin_messages.h" #include "content/browser/browser_thread.h" #include "content/browser/plugin_service.h" +#include "content/common/plugin_messages.h" #include "webkit/plugins/npapi/plugin_group.h" #include "webkit/plugins/npapi/plugin_list.h" diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm index 0fd9a81..47d63e2 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm +++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm @@ -27,7 +27,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/edit_command.h" #include "chrome/common/native_web_keyboard_event.h" -#include "chrome/common/plugin_messages.h" #include "chrome/common/render_messages.h" #include "content/browser/browser_thread.h" #include "content/browser/gpu_process_host.h" @@ -37,6 +36,7 @@ #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/renderer_host/render_widget_host.h" #include "content/common/gpu_messages.h" +#include "content/common/plugin_messages.h" #include "skia/ext/platform_canvas.h" #import "third_party/mozilla/ComplexTextInputPanel.h" #include "third_party/skia/include/core/SkColor.h" diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc index 65c4159..2df9312 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_win.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc @@ -20,7 +20,6 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/native_web_keyboard_event.h" -#include "chrome/common/plugin_messages.h" #include "chrome/common/render_messages.h" #include "content/browser/browser_thread.h" #include "content/browser/plugin_process_host.h" @@ -29,6 +28,7 @@ #include "content/browser/renderer_host/render_process_host.h" #include "content/browser/renderer_host/render_widget_host.h" #include "content/common/notification_service.h" +#include "content/common/plugin_messages.h" #include "grit/webkit_resources.h" #include "skia/ext/skia_utils_win.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" diff --git a/chrome/browser/ui/views/about_ipc_dialog.cc b/chrome/browser/ui/views/about_ipc_dialog.cc index 12fe150..1215473 100644 --- a/chrome/browser/ui/views/about_ipc_dialog.cc +++ b/chrome/browser/ui/views/about_ipc_dialog.cc @@ -25,8 +25,8 @@ #include "chrome/browser/ui/browser_dialogs.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/devtools_messages.h" -#include "chrome/common/plugin_messages.h" #include "chrome/common/render_messages.h" +#include "content/common/plugin_messages.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_job.h" #include "net/url_request/url_request_job_tracker.h" diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index b3b67c6..93e08d8 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -163,7 +163,6 @@ '../third_party/libxml/libxml.gyp:libxml', '../third_party/sqlite/sqlite.gyp:sqlite', '../third_party/zlib/zlib.gyp:zlib', - '../third_party/npapi/npapi.gyp:npapi', '../webkit/support/webkit_support.gyp:glue', ], 'sources': [ @@ -249,9 +248,6 @@ 'common/pepper_plugin_registry.h', 'common/plugin_carbon_interpose_constants_mac.cc', 'common/plugin_carbon_interpose_constants_mac.h', - 'common/plugin_messages.cc', - 'common/plugin_messages.h', - 'common/plugin_messages_internal.h', 'common/persistent_pref_store.h', 'common/pref_store.cc', 'common/pref_store.h', @@ -506,7 +502,6 @@ '../third_party/libxml/libxml.gyp:libxml', ], 'include_dirs': [ - '../third_party/npapi', '../third_party/icu/public/i18n', '../third_party/icu/public/common', # We usually get these skia directories by adding a dependency on diff --git a/chrome/common/common_message_generator.h b/chrome/common/common_message_generator.h index cbd4bca..af25053 100644 --- a/chrome/common/common_message_generator.h +++ b/chrome/common/common_message_generator.h @@ -19,7 +19,6 @@ #include "chrome/common/nacl_messages.h" #include "chrome/common/pepper_file_messages.h" #include "chrome/common/pepper_messages.h" -#include "chrome/common/plugin_messages.h" #include "chrome/common/render_messages.h" #include "chrome/common/service_messages.h" diff --git a/chrome/common/common_param_traits.h b/chrome/common/common_param_traits.h index b5fd950..70bd402 100644 --- a/chrome/common/common_param_traits.h +++ b/chrome/common/common_param_traits.h @@ -12,7 +12,6 @@ #define CHROME_COMMON_COMMON_PARAM_TRAITS_H_ #pragma once -#include "app/surface/transport_dib.h" #include "base/file_util.h" #include "base/ref_counted.h" #include "chrome/common/content_settings.h" @@ -27,7 +26,6 @@ // // TODO(erg): The following headers are historical and only work because // their definitions are inlined, which also needs to be fixed. -#include "webkit/glue/webcursor.h" #include "webkit/glue/window_open_disposition.h" // Forward declarations. @@ -37,7 +35,6 @@ class DictionaryValue; class ListValue; struct ThumbnailScore; struct WebApplicationInfo; -class WebCursor; namespace printing { struct PageRange; @@ -135,22 +132,6 @@ struct ParamTraits<WindowOpenDisposition> { } }; - -template <> -struct ParamTraits<WebCursor> { - typedef WebCursor param_type; - static void Write(Message* m, const param_type& p) { - p.Serialize(m); - } - static bool Read(const Message* m, void** iter, param_type* r) { - return r->Deserialize(m, iter); - } - static void Log(const param_type& p, std::string* l) { - l->append("<WebCursor>"); - } -}; - - template <> struct ParamTraits<WebApplicationInfo> { typedef WebApplicationInfo param_type; @@ -159,29 +140,6 @@ struct ParamTraits<WebApplicationInfo> { static void Log(const param_type& p, std::string* l); }; - -#if defined(OS_WIN) -template<> -struct ParamTraits<TransportDIB::Id> { - typedef TransportDIB::Id param_type; - static void Write(Message* m, const param_type& p) { - WriteParam(m, p.handle); - WriteParam(m, p.sequence_num); - } - static bool Read(const Message* m, void** iter, param_type* r) { - return (ReadParam(m, iter, &r->handle) && - ReadParam(m, iter, &r->sequence_num)); - } - static void Log(const param_type& p, std::string* l) { - l->append("TransportDIB("); - LogParam(p.handle, l); - l->append(", "); - LogParam(p.sequence_num, l); - l->append(")"); - } -}; -#endif - template<> struct ParamTraits<ThumbnailScore> { typedef ThumbnailScore param_type; diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc index 5b16b02..ebac022 100644 --- a/chrome/common/logging_chrome.cc +++ b/chrome/common/logging_chrome.cc @@ -17,8 +17,8 @@ #if defined(OS_POSIX) && defined(IPC_MESSAGE_LOG_ENABLED) #define IPC_MESSAGE_MACROS_LOG_ENABLED #include "chrome/common/devtools_messages.h" -#include "chrome/common/plugin_messages.h" #include "chrome/common/render_messages.h" +#include "content/common/plugin_messages.h" #include "content/common/worker_messages.h" #endif diff --git a/chrome/common/plugin_messages.cc b/chrome/common/plugin_messages.cc deleted file mode 100644 index fe09d04..0000000 --- a/chrome/common/plugin_messages.cc +++ /dev/null @@ -1,315 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/utf_string_conversions.h" -#include "content/common/common_param_traits.h" -#include "ipc/ipc_channel_handle.h" - -#define IPC_MESSAGE_IMPL -#include "chrome/common/plugin_messages.h" - -PluginMsg_Init_Params::PluginMsg_Init_Params() - : containing_window(0), - load_manually(false), - host_render_view_routing_id(-1) { -} - -PluginMsg_Init_Params::~PluginMsg_Init_Params() { -} - -PluginHostMsg_URLRequest_Params::PluginHostMsg_URLRequest_Params() - : notify_id(-1), - popups_allowed(false), - notify_redirects(false) { -} - -PluginHostMsg_URLRequest_Params::~PluginHostMsg_URLRequest_Params() { -} - -PluginMsg_DidReceiveResponseParams::PluginMsg_DidReceiveResponseParams() - : id(-1), - expected_length(0), - last_modified(0), - request_is_seekable(false) { -} - -PluginMsg_DidReceiveResponseParams::~PluginMsg_DidReceiveResponseParams() { -} - -NPIdentifier_Param::NPIdentifier_Param() - : identifier() { -} - -NPIdentifier_Param::~NPIdentifier_Param() { -} - -NPVariant_Param::NPVariant_Param() - : type(NPVARIANT_PARAM_VOID), - bool_value(false), - int_value(0), - double_value(0), - npobject_routing_id(-1) { -} - -NPVariant_Param::~NPVariant_Param() { -} - -PluginMsg_UpdateGeometry_Param::PluginMsg_UpdateGeometry_Param() - : transparent(false), -#if !defined(OS_MACOSX) - windowless_buffer(TransportDIB::DefaultHandleValue()), - background_buffer(TransportDIB::DefaultHandleValue()) -#else - ack_key(-1) -#endif // !defined(OS_MACOSX) -{ -} - -PluginMsg_UpdateGeometry_Param::~PluginMsg_UpdateGeometry_Param() { -} - -namespace IPC { - -void ParamTraits<PluginMsg_Init_Params>::Write(Message* m, - const param_type& p) { - WriteParam(m, p.containing_window); - WriteParam(m, p.url); - WriteParam(m, p.page_url); - DCHECK(p.arg_names.size() == p.arg_values.size()); - WriteParam(m, p.arg_names); - WriteParam(m, p.arg_values); - WriteParam(m, p.load_manually); - WriteParam(m, p.host_render_view_routing_id); -} - -bool ParamTraits<PluginMsg_Init_Params>::Read(const Message* m, - void** iter, - param_type* p) { - return ReadParam(m, iter, &p->containing_window) && - ReadParam(m, iter, &p->url) && - ReadParam(m, iter, &p->page_url) && - ReadParam(m, iter, &p->arg_names) && - ReadParam(m, iter, &p->arg_values) && - ReadParam(m, iter, &p->load_manually) && - ReadParam(m, iter, &p->host_render_view_routing_id); -} - -void ParamTraits<PluginMsg_Init_Params>::Log(const param_type& p, - std::string* l) { - l->append("("); - LogParam(p.containing_window, l); - l->append(", "); - LogParam(p.url, l); - l->append(", "); - LogParam(p.page_url, l); - l->append(", "); - LogParam(p.arg_names, l); - l->append(", "); - LogParam(p.arg_values, l); - l->append(", "); - LogParam(p.load_manually, l); - l->append(", "); - LogParam(p.host_render_view_routing_id, l); - l->append(")"); -} - -void ParamTraits<PluginHostMsg_URLRequest_Params>::Write(Message* m, - const param_type& p) { - WriteParam(m, p.url); - WriteParam(m, p.method); - WriteParam(m, p.target); - WriteParam(m, p.buffer); - WriteParam(m, p.notify_id); - WriteParam(m, p.popups_allowed); - WriteParam(m, p.notify_redirects); -} - -bool ParamTraits<PluginHostMsg_URLRequest_Params>::Read(const Message* m, - void** iter, - param_type* p) { - return - ReadParam(m, iter, &p->url) && - ReadParam(m, iter, &p->method) && - ReadParam(m, iter, &p->target) && - ReadParam(m, iter, &p->buffer) && - ReadParam(m, iter, &p->notify_id) && - ReadParam(m, iter, &p->popups_allowed) && - ReadParam(m, iter, &p->notify_redirects); -} - -void ParamTraits<PluginHostMsg_URLRequest_Params>::Log(const param_type& p, - std::string* l) { - l->append("("); - LogParam(p.url, l); - l->append(", "); - LogParam(p.method, l); - l->append(", "); - LogParam(p.target, l); - l->append(", "); - LogParam(p.buffer, l); - l->append(", "); - LogParam(p.notify_id, l); - l->append(", "); - LogParam(p.popups_allowed, l); - l->append(", "); - LogParam(p.notify_redirects, l); - l->append(")"); -} - - -void ParamTraits<PluginMsg_DidReceiveResponseParams>::Write( - Message* m, - const param_type& p) { - WriteParam(m, p.id); - WriteParam(m, p.mime_type); - WriteParam(m, p.headers); - WriteParam(m, p.expected_length); - WriteParam(m, p.last_modified); - WriteParam(m, p.request_is_seekable); -} - -bool ParamTraits<PluginMsg_DidReceiveResponseParams>::Read(const Message* m, - void** iter, - param_type* r) { - return - ReadParam(m, iter, &r->id) && - ReadParam(m, iter, &r->mime_type) && - ReadParam(m, iter, &r->headers) && - ReadParam(m, iter, &r->expected_length) && - ReadParam(m, iter, &r->last_modified) && - ReadParam(m, iter, &r->request_is_seekable); -} - -void ParamTraits<PluginMsg_DidReceiveResponseParams>::Log(const param_type& p, - std::string* l) { - l->append("("); - LogParam(p.id, l); - l->append(", "); - LogParam(p.mime_type, l); - l->append(", "); - LogParam(p.headers, l); - l->append(", "); - LogParam(p.expected_length, l); - l->append(", "); - LogParam(p.last_modified, l); - l->append(", "); - LogParam(p.request_is_seekable, l); - l->append(")"); -} - - -void ParamTraits<NPVariant_Param>::Write(Message* m, const param_type& p) { - WriteParam(m, static_cast<int>(p.type)); - if (p.type == NPVARIANT_PARAM_BOOL) { - WriteParam(m, p.bool_value); - } else if (p.type == NPVARIANT_PARAM_INT) { - WriteParam(m, p.int_value); - } else if (p.type == NPVARIANT_PARAM_DOUBLE) { - WriteParam(m, p.double_value); - } else if (p.type == NPVARIANT_PARAM_STRING) { - WriteParam(m, p.string_value); - } else if (p.type == NPVARIANT_PARAM_SENDER_OBJECT_ROUTING_ID || - p.type == NPVARIANT_PARAM_RECEIVER_OBJECT_ROUTING_ID) { - // This is the routing id used to connect NPObjectProxy in the other - // process with NPObjectStub in this process or to identify the raw - // npobject pointer to be used in the callee process. - WriteParam(m, p.npobject_routing_id); - } else { - DCHECK(p.type == NPVARIANT_PARAM_VOID || p.type == NPVARIANT_PARAM_NULL); - } -} - -bool ParamTraits<NPVariant_Param>::Read(const Message* m, - void** iter, - param_type* r) { - int type; - if (!ReadParam(m, iter, &type)) - return false; - - bool result = false; - r->type = static_cast<NPVariant_ParamEnum>(type); - if (r->type == NPVARIANT_PARAM_BOOL) { - result = ReadParam(m, iter, &r->bool_value); - } else if (r->type == NPVARIANT_PARAM_INT) { - result = ReadParam(m, iter, &r->int_value); - } else if (r->type == NPVARIANT_PARAM_DOUBLE) { - result = ReadParam(m, iter, &r->double_value); - } else if (r->type == NPVARIANT_PARAM_STRING) { - result = ReadParam(m, iter, &r->string_value); - } else if (r->type == NPVARIANT_PARAM_SENDER_OBJECT_ROUTING_ID || - r->type == NPVARIANT_PARAM_RECEIVER_OBJECT_ROUTING_ID) { - result = ReadParam(m, iter, &r->npobject_routing_id); - } else if ((r->type == NPVARIANT_PARAM_VOID) || - (r->type == NPVARIANT_PARAM_NULL)) { - result = true; - } else { - NOTREACHED(); - } - - return result; -} - -void ParamTraits<NPVariant_Param>::Log(const param_type& p, std::string* l) { - if (p.type == NPVARIANT_PARAM_BOOL) { - LogParam(p.bool_value, l); - } else if (p.type == NPVARIANT_PARAM_INT) { - LogParam(p.int_value, l); - } else if (p.type == NPVARIANT_PARAM_DOUBLE) { - LogParam(p.double_value, l); - } else if (p.type == NPVARIANT_PARAM_STRING) { - LogParam(p.string_value, l); - } else if (p.type == NPVARIANT_PARAM_SENDER_OBJECT_ROUTING_ID || - p.type == NPVARIANT_PARAM_RECEIVER_OBJECT_ROUTING_ID) { - LogParam(p.npobject_routing_id, l); - } -} - -void ParamTraits<PluginMsg_UpdateGeometry_Param>::Write(Message* m, - const param_type& p) { - WriteParam(m, p.window_rect); - WriteParam(m, p.clip_rect); - WriteParam(m, p.windowless_buffer); - WriteParam(m, p.background_buffer); - WriteParam(m, p.transparent); -#if defined(OS_MACOSX) - WriteParam(m, p.ack_key); -#endif -} - -bool ParamTraits<PluginMsg_UpdateGeometry_Param>::Read(const Message* m, - void** iter, - param_type* r) { - return - ReadParam(m, iter, &r->window_rect) && - ReadParam(m, iter, &r->clip_rect) && - ReadParam(m, iter, &r->windowless_buffer) && - ReadParam(m, iter, &r->background_buffer) && - ReadParam(m, iter, &r->transparent) -#if defined(OS_MACOSX) - && - ReadParam(m, iter, &r->ack_key) -#endif - ; -} - -void ParamTraits<PluginMsg_UpdateGeometry_Param>::Log(const param_type& p, - std::string* l) { - l->append("("); - LogParam(p.window_rect, l); - l->append(", "); - LogParam(p.clip_rect, l); - l->append(", "); - LogParam(p.windowless_buffer, l); - l->append(", "); - LogParam(p.background_buffer, l); - l->append(", "); - LogParam(p.transparent, l); -#if defined(OS_MACOSX) - l->append(", "); - LogParam(p.ack_key, l); -#endif - l->append(")"); -} - -} // namespace IPC diff --git a/chrome/common/plugin_messages.h b/chrome/common/plugin_messages.h deleted file mode 100644 index 721312d..0000000 --- a/chrome/common/plugin_messages.h +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Defines messages between the browser and plugin process, as well as between -// the renderer and plugin process. -// -// See render_message* for information about the multi-pass include of headers. - -#ifndef CHROME_COMMON_PLUGIN_MESSAGES_H_ -#define CHROME_COMMON_PLUGIN_MESSAGES_H_ -#pragma once - -#include <string> -#include <vector> - -#include "base/basictypes.h" -#include "base/string_number_conversions.h" -#include "chrome/common/common_param_traits.h" -#include "chrome/common/webkit_param_traits.h" -#include "googleurl/src/gurl.h" -#include "ipc/ipc_message_utils.h" -#include "third_party/npapi/bindings/npapi.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" -#include "ui/gfx/native_widget_types.h" -#include "ui/gfx/rect.h" -#include "webkit/glue/npruntime_util.h" - -// Name prefix of the event handle when a message box is displayed. -#define kMessageBoxEventPrefix L"message_box_active" - -// Structures for messages that have too many parameters to be put in a -// predefined IPC message. - -struct PluginMsg_Init_Params { - PluginMsg_Init_Params(); - ~PluginMsg_Init_Params(); - - gfx::NativeViewId containing_window; - GURL url; - GURL page_url; - std::vector<std::string> arg_names; - std::vector<std::string> arg_values; - bool load_manually; - int host_render_view_routing_id; -}; - -struct PluginHostMsg_URLRequest_Params { - PluginHostMsg_URLRequest_Params(); - ~PluginHostMsg_URLRequest_Params(); - - std::string url; - std::string method; - std::string target; - std::vector<char> buffer; - int notify_id; - bool popups_allowed; - bool notify_redirects; -}; - -struct PluginMsg_DidReceiveResponseParams { - PluginMsg_DidReceiveResponseParams(); - ~PluginMsg_DidReceiveResponseParams(); - - unsigned long id; - std::string mime_type; - std::string headers; - uint32 expected_length; - uint32 last_modified; - bool request_is_seekable; -}; - -struct NPIdentifier_Param { - NPIdentifier_Param(); - ~NPIdentifier_Param(); - - NPIdentifier identifier; -}; - -enum NPVariant_ParamEnum { - NPVARIANT_PARAM_VOID, - NPVARIANT_PARAM_NULL, - NPVARIANT_PARAM_BOOL, - NPVARIANT_PARAM_INT, - NPVARIANT_PARAM_DOUBLE, - NPVARIANT_PARAM_STRING, - // Used when when the NPObject is running in the caller's process, so we - // create an NPObjectProxy in the other process. - NPVARIANT_PARAM_SENDER_OBJECT_ROUTING_ID, - // Used when the NPObject we're sending is running in the callee's process - // (i.e. we have an NPObjectProxy for it). In that case we want the callee - // to just use the raw pointer. - NPVARIANT_PARAM_RECEIVER_OBJECT_ROUTING_ID, -}; - -struct NPVariant_Param { - NPVariant_Param(); - ~NPVariant_Param(); - - NPVariant_ParamEnum type; - bool bool_value; - int int_value; - double double_value; - std::string string_value; - int npobject_routing_id; -}; - -struct PluginMsg_UpdateGeometry_Param { - PluginMsg_UpdateGeometry_Param(); - ~PluginMsg_UpdateGeometry_Param(); - - gfx::Rect window_rect; - gfx::Rect clip_rect; - bool transparent; - TransportDIB::Handle windowless_buffer; - TransportDIB::Handle background_buffer; - -#if defined(OS_MACOSX) - // This field contains a key that the plug-in process is expected to return - // to the renderer in its ACK message, unless the value is -1, in which case - // no ACK message is required. Other than the special -1 value, the values - // used in ack_key are opaque to the plug-in process. - int ack_key; -#endif -}; - - -namespace IPC { - -// Traits for PluginMsg_Init_Params structure to pack/unpack. -template <> -struct ParamTraits<PluginMsg_Init_Params> { - typedef PluginMsg_Init_Params param_type; - static void Write(Message* m, const param_type& p); - static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::string* l); -}; - -template <> -struct ParamTraits<PluginHostMsg_URLRequest_Params> { - typedef PluginHostMsg_URLRequest_Params param_type; - static void Write(Message* m, const param_type& p); - static bool Read(const Message* m, void** iter, param_type* p); - static void Log(const param_type& p, std::string* l); -}; - -template <> -struct ParamTraits<PluginMsg_DidReceiveResponseParams> { - typedef PluginMsg_DidReceiveResponseParams param_type; - static void Write(Message* m, const param_type& p); - static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::string* l); -}; - -typedef const WebKit::WebInputEvent* WebInputEventPointer; -template <> -struct ParamTraits<WebInputEventPointer> { - typedef WebInputEventPointer param_type; - static void Write(Message* m, const param_type& p) { - m->WriteData(reinterpret_cast<const char*>(p), p->size); - } - // Note: upon read, the event has the lifetime of the message. - static bool Read(const Message* m, void** iter, param_type* r) { - const char* data; - int data_length; - if (!m->ReadData(iter, &data, &data_length)) { - NOTREACHED(); - return false; - } - if (data_length < static_cast<int>(sizeof(WebKit::WebInputEvent))) { - NOTREACHED(); - return false; - } - param_type event = reinterpret_cast<param_type>(data); - // Check that the data size matches that of the event (we check the latter - // in the delegate). - if (data_length != static_cast<int>(event->size)) { - NOTREACHED(); - return false; - } - *r = event; - return true; - } - static void Log(const param_type& p, std::string* l) { - l->append("("); - LogParam(p->size, l); - l->append(", "); - LogParam(p->type, l); - l->append(", "); - LogParam(p->timeStampSeconds, l); - l->append(")"); - } -}; - -template <> -struct ParamTraits<NPIdentifier_Param> { - typedef NPIdentifier_Param param_type; - static void Write(Message* m, const param_type& p) { - webkit_glue::SerializeNPIdentifier(p.identifier, m); - } - static bool Read(const Message* m, void** iter, param_type* r) { - return webkit_glue::DeserializeNPIdentifier(*m, iter, &r->identifier); - } - static void Log(const param_type& p, std::string* l) { - if (WebKit::WebBindings::identifierIsString(p.identifier)) { - NPUTF8* str = WebKit::WebBindings::utf8FromIdentifier(p.identifier); - l->append(str); - NPN_MemFree(str); - } else { - l->append(base::IntToString( - WebKit::WebBindings::intFromIdentifier(p.identifier))); - } - } -}; - -template <> -struct ParamTraits<NPVariant_Param> { - typedef NPVariant_Param param_type; - static void Write(Message* m, const param_type& p); - static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::string* l); -}; - -// For windowless plugins, windowless_buffer -// contains a buffer that the plugin draws into. background_buffer is used -// for transparent windowless plugins, and holds the background of the plugin -// rectangle. -template <> -struct ParamTraits<PluginMsg_UpdateGeometry_Param> { - typedef PluginMsg_UpdateGeometry_Param param_type; - static void Write(Message* m, const param_type& p); - static bool Read(const Message* m, void** iter, param_type* r); - static void Log(const param_type& p, std::string* l); -}; - -} // namespace IPC - -#include "chrome/common/plugin_messages_internal.h" - -#endif // CHROME_COMMON_PLUGIN_MESSAGES_H_ diff --git a/chrome/common/plugin_messages_internal.h b/chrome/common/plugin_messages_internal.h deleted file mode 100644 index 111c4c2..0000000 --- a/chrome/common/plugin_messages_internal.h +++ /dev/null @@ -1,444 +0,0 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/shared_memory.h" -#include "build/build_config.h" -#include "ipc/ipc_message_macros.h" -#include "ui/gfx/native_widget_types.h" -#include "webkit/glue/webcursor.h" - -#if defined(OS_POSIX) -#include "base/file_descriptor_posix.h" -#endif - -#define IPC_MESSAGE_START PluginMsgStart - -//----------------------------------------------------------------------------- -// PluginProcess messages -// These are messages sent from the browser to the plugin process. -// Tells the plugin process to create a new channel for communication with a -// given renderer. The channel name is returned in a -// PluginProcessHostMsg_ChannelCreated message. The renderer ID is passed so -// that the plugin process reuses an existing channel to that process if it -// exists. This ID is a unique opaque identifier generated by the browser -// process. -IPC_MESSAGE_CONTROL2(PluginProcessMsg_CreateChannel, - int /* renderer_id */, - bool /* off_the_record */) - -// Tells the plugin process to notify every connected renderer of the pending -// shutdown, so we don't mistake it for a crash. -IPC_MESSAGE_CONTROL0(PluginProcessMsg_NotifyRenderersOfPendingShutdown) - - -//----------------------------------------------------------------------------- -// PluginProcessHost messages -// These are messages sent from the plugin process to the browser process. -// Response to a PluginProcessMsg_CreateChannel message. -IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_ChannelCreated, - IPC::ChannelHandle /* channel_handle */) - -IPC_SYNC_MESSAGE_CONTROL0_1(PluginProcessHostMsg_GetPluginFinderUrl, - std::string /* plugin finder URL */) - -IPC_MESSAGE_CONTROL0(PluginProcessHostMsg_ShutdownRequest) - -// Get the list of proxies to use for |url|, as a semicolon delimited list -// of "<TYPE> <HOST>:<PORT>" | "DIRECT". See also ViewHostMsg_ResolveProxy -// which does the same thing. -IPC_SYNC_MESSAGE_CONTROL1_2(PluginProcessHostMsg_ResolveProxy, - GURL /* url */, - int /* network error */, - std::string /* proxy list */) - -#if defined(OS_WIN) -// Destroys the given window's parent on the UI thread. -IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_PluginWindowDestroyed, - HWND /* window */, - HWND /* parent */) - -IPC_MESSAGE_ROUTED3(PluginProcessHostMsg_DownloadUrl, - std::string /* URL */, - int /* process id */, - HWND /* caller window */) -#endif - -#if defined(USE_X11) -// On X11, the mapping between NativeViewId and X window ids -// is known only to the browser. This message lets the plugin process -// ask about a NativeViewId that was provided by the renderer. -// It will get 0 back if it's a bogus input. -IPC_SYNC_MESSAGE_CONTROL1_1(PluginProcessHostMsg_MapNativeViewId, - gfx::NativeViewId /* input: native view id */, - gfx::PluginWindowHandle /* output: X window id */) -#endif - -#if defined(OS_MACOSX) -// On Mac OS X, we need the browser to keep track of plugin windows so -// that it can add and remove them from stacking groups, hide and show the -// menu bar, etc. We pass the window rect for convenience so that the -// browser can easily tell if the window is fullscreen. - -// Notifies the browser that the plugin has selected a window (i.e., brought -// it to the front and wants it to have keyboard focus). -IPC_MESSAGE_CONTROL3(PluginProcessHostMsg_PluginSelectWindow, - uint32 /* window ID */, - gfx::Rect /* window rect */, - bool /* modal */) - -// Notifies the browser that the plugin has shown a window. -IPC_MESSAGE_CONTROL3(PluginProcessHostMsg_PluginShowWindow, - uint32 /* window ID */, - gfx::Rect /* window rect */, - bool /* modal */) - -// Notifies the browser that the plugin has hidden a window. -IPC_MESSAGE_CONTROL2(PluginProcessHostMsg_PluginHideWindow, - uint32 /* window ID */, - gfx::Rect /* window rect */) - -// Notifies the browser that a plugin instance has requested a cursor -// visibility change. -IPC_MESSAGE_CONTROL1(PluginProcessHostMsg_PluginSetCursorVisibility, - bool /* cursor visibility */) -#endif - - -//----------------------------------------------------------------------------- -// Plugin messages -// These are messages sent from the renderer process to the plugin process. -// Tells the plugin process to create a new plugin instance with the given -// id. A corresponding WebPluginDelegateStub is created which hosts the -// WebPluginDelegateImpl. -IPC_SYNC_MESSAGE_CONTROL1_1(PluginMsg_CreateInstance, - std::string /* mime_type */, - int /* instance_id */) - -// The WebPluginDelegateProxy sends this to the WebPluginDelegateStub in its -// destructor, so that the stub deletes the actual WebPluginDelegateImpl -// object that it's hosting. -IPC_SYNC_MESSAGE_CONTROL1_0(PluginMsg_DestroyInstance, - int /* instance_id */) - -IPC_SYNC_MESSAGE_CONTROL0_1(PluginMsg_GenerateRouteID, - int /* id */) - -// The messages below all map to WebPluginDelegate methods. -IPC_SYNC_MESSAGE_ROUTED1_1(PluginMsg_Init, - PluginMsg_Init_Params, - bool /* result */) - -// Used to synchronously request a paint for windowless plugins. -IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_Paint, - gfx::Rect /* damaged_rect */) - -// Sent by the renderer after it paints from its backing store so that the -// plugin knows it can send more invalidates. -IPC_MESSAGE_ROUTED0(PluginMsg_DidPaint) - -IPC_SYNC_MESSAGE_ROUTED0_2(PluginMsg_Print, - base::SharedMemoryHandle /* shared_memory*/, - uint32 /* size */) - -IPC_SYNC_MESSAGE_ROUTED0_1(PluginMsg_GetPluginScriptableObject, - int /* route_id */) - -IPC_MESSAGE_ROUTED3(PluginMsg_DidFinishLoadWithReason, - GURL /* url */, - int /* reason */, - int /* notify_id */) - -// Updates the plugin location. -IPC_MESSAGE_ROUTED1(PluginMsg_UpdateGeometry, - PluginMsg_UpdateGeometry_Param) - -// A synchronous version of above. -IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_UpdateGeometrySync, - PluginMsg_UpdateGeometry_Param) - -IPC_SYNC_MESSAGE_ROUTED1_0(PluginMsg_SetFocus, - bool /* focused */) - -IPC_SYNC_MESSAGE_ROUTED1_2(PluginMsg_HandleInputEvent, - IPC::WebInputEventPointer /* event */, - bool /* handled */, - WebCursor /* cursor type*/) - -IPC_MESSAGE_ROUTED1(PluginMsg_SetContentAreaFocus, - bool /* has_focus */) - -#if defined(OS_MACOSX) -IPC_MESSAGE_ROUTED1(PluginMsg_SetWindowFocus, - bool /* has_focus */) - -IPC_MESSAGE_ROUTED0(PluginMsg_ContainerHidden) - -IPC_MESSAGE_ROUTED3(PluginMsg_ContainerShown, - gfx::Rect /* window_frame */, - gfx::Rect /* view_frame */, - bool /* has_focus */) - -IPC_MESSAGE_ROUTED2(PluginMsg_WindowFrameChanged, - gfx::Rect /* window_frame */, - gfx::Rect /* view_frame */) - -IPC_MESSAGE_ROUTED1(PluginMsg_ImeCompositionCompleted, - string16 /* text */) -#endif - -IPC_SYNC_MESSAGE_ROUTED3_0(PluginMsg_WillSendRequest, - unsigned long /* id */, - GURL /* url */, - int /* http_status_code */) - -IPC_MESSAGE_ROUTED1(PluginMsg_DidReceiveResponse, - PluginMsg_DidReceiveResponseParams) - -IPC_MESSAGE_ROUTED3(PluginMsg_DidReceiveData, - unsigned long /* id */, - std::vector<char> /* buffer */, - int /* data_offset */) - -IPC_MESSAGE_ROUTED1(PluginMsg_DidFinishLoading, - unsigned long /* id */) - -IPC_MESSAGE_ROUTED1(PluginMsg_DidFail, - unsigned long /* id */) - -IPC_MESSAGE_ROUTED4(PluginMsg_SendJavaScriptStream, - GURL /* url */, - std::string /* result */, - bool /* success */, - int /* notify_id */) - -IPC_MESSAGE_ROUTED2(PluginMsg_DidReceiveManualResponse, - GURL /* url */, - PluginMsg_DidReceiveResponseParams) - -IPC_MESSAGE_ROUTED1(PluginMsg_DidReceiveManualData, - std::vector<char> /* buffer */) - -IPC_MESSAGE_ROUTED0(PluginMsg_DidFinishManualLoading) - -IPC_MESSAGE_ROUTED0(PluginMsg_DidManualLoadFail) - -IPC_MESSAGE_ROUTED0(PluginMsg_InstallMissingPlugin) - -IPC_MESSAGE_ROUTED3(PluginMsg_HandleURLRequestReply, - unsigned long /* resource_id */, - GURL /* url */, - int /* notify_id */) - -IPC_MESSAGE_ROUTED2(PluginMsg_HTTPRangeRequestReply, - unsigned long /* resource_id */, - int /* range_request_id */) - -IPC_MESSAGE_CONTROL1(PluginMsg_SignalModalDialogEvent, - gfx::NativeViewId /* containing_window */) - -IPC_MESSAGE_CONTROL1(PluginMsg_ResetModalDialogEvent, - gfx::NativeViewId /* containing_window */) - -#if defined(OS_MACOSX) -// This message, used only on 10.6 and later, transmits the "fake" -// window handle allocated by the browser on behalf of the renderer -// to the GPU plugin. -IPC_MESSAGE_ROUTED1(PluginMsg_SetFakeAcceleratedSurfaceWindowHandle, - gfx::PluginWindowHandle /* window */) -#endif - -IPC_MESSAGE_CONTROL3(PluginMsg_ClearSiteData, - std::string, /* site */ - uint64, /* flags */ - base::Time /* begin_time */) - - -//----------------------------------------------------------------------------- -// PluginHost messages -// These are messages sent from the plugin process to the renderer process. -// They all map to the corresponding WebPlugin methods. -// Sends the plugin window information to the renderer. -// The window parameter is a handle to the window if the plugin is a windowed -// plugin. It is NULL for windowless plugins. -IPC_SYNC_MESSAGE_ROUTED1_0(PluginHostMsg_SetWindow, - gfx::PluginWindowHandle /* window */) - -#if defined(OS_WIN) -// The modal_loop_pump_messages_event parameter is an event handle which is -// passed in for windowless plugins and is used to indicate if messages -// are to be pumped in sync calls to the plugin process. Currently used -// in HandleEvent calls. -IPC_SYNC_MESSAGE_ROUTED1_0(PluginHostMsg_SetWindowlessPumpEvent, - HANDLE /* modal_loop_pump_messages_event */) -#endif - -IPC_MESSAGE_ROUTED1(PluginHostMsg_URLRequest, - PluginHostMsg_URLRequest_Params) - -IPC_MESSAGE_ROUTED1(PluginHostMsg_CancelResource, - int /* id */) - -IPC_MESSAGE_ROUTED1(PluginHostMsg_InvalidateRect, - gfx::Rect /* rect */) - -IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_GetWindowScriptNPObject, - int /* route id */, - bool /* success */) - -IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_GetPluginElement, - int /* route id */, - bool /* success */) - -IPC_MESSAGE_ROUTED3(PluginHostMsg_SetCookie, - GURL /* url */, - GURL /* first_party_for_cookies */, - std::string /* cookie */) - -IPC_SYNC_MESSAGE_ROUTED2_1(PluginHostMsg_GetCookies, - GURL /* url */, - GURL /* first_party_for_cookies */, - std::string /* cookies */) - -IPC_MESSAGE_ROUTED1(PluginHostMsg_MissingPluginStatus, - int /* status */) - -IPC_MESSAGE_ROUTED0(PluginHostMsg_CancelDocumentLoad) - -IPC_MESSAGE_ROUTED3(PluginHostMsg_InitiateHTTPRangeRequest, - std::string /* url */, - std::string /* range_info */, - int /* range_request_id */) - -IPC_MESSAGE_ROUTED2(PluginHostMsg_DeferResourceLoading, - unsigned long /* resource_id */, - bool /* defer */) - -IPC_SYNC_MESSAGE_CONTROL1_0(PluginHostMsg_SetException, - std::string /* message */) - -IPC_MESSAGE_CONTROL0(PluginHostMsg_PluginShuttingDown) - -#if defined(OS_MACOSX) -IPC_MESSAGE_ROUTED1(PluginHostMsg_UpdateGeometry_ACK, - int /* ack_key */) - -IPC_MESSAGE_ROUTED1(PluginHostMsg_FocusChanged, - bool /* focused */) - -IPC_MESSAGE_ROUTED0(PluginHostMsg_StartIme) - -// This message, used in Mac OS X 10.5 and earlier, is sent from the plug-in -// process to the renderer process to indicate that the plug-in allocated a -// new TransportDIB that holds the GPU's rendered image. This information is -// then forwarded to the browser process via a similar message. -IPC_MESSAGE_ROUTED4(PluginHostMsg_AcceleratedSurfaceSetTransportDIB, - gfx::PluginWindowHandle /* window */, - int32 /* width */, - int32 /* height */, - TransportDIB::Handle /* handle to the TransportDIB */) - -// Synthesize a fake window handle for the plug-in to identify the instance -// to the browser, allowing mapping to a surface for hardware accelleration -// of plug-in content. The browser generates the handle which is then set on -// the plug-in. |opaque| indicates whether the content should be treated as -// opaque. -IPC_MESSAGE_ROUTED1(PluginHostMsg_BindFakePluginWindowHandle, - bool /* opaque */) - -// This message, used only on 10.6 and later, is sent from the plug-in process -// to the renderer process to indicate that the plugin allocated a new -// IOSurface object of the given width and height. This information is then -// forwarded on to the browser process. -// -// NOTE: the original intent was to pass a mach port as the IOSurface -// identifier but it looks like that will be a lot of work. For now we pass an -// ID from IOSurfaceGetID. -IPC_MESSAGE_ROUTED4(PluginHostMsg_AcceleratedSurfaceSetIOSurface, - gfx::PluginWindowHandle /* window */, - int32 /* width */, - int32 /* height */, - uint64 /* surface_id */) - - -// On the Mac, shared memory can't be allocated in the sandbox, so -// the TransportDIB used by the plug-in for rendering has to be allocated -// and managed by the browser. This is a synchronous message, use with care. -IPC_SYNC_MESSAGE_ROUTED1_1(PluginHostMsg_AllocTransportDIB, - size_t /* requested memory size */, - TransportDIB::Handle /* output: DIB handle */) - -// Since the browser keeps handles to the allocated transport DIBs, this -// message is sent to tell the browser that it may release them when the -// renderer is finished with them. -IPC_MESSAGE_ROUTED1(PluginHostMsg_FreeTransportDIB, - TransportDIB::Id /* DIB id */) - -// This message notifies the renderer process (and from there the -// browser process) that the plug-in swapped the buffers associated -// with the given "window", which should cause the browser to redraw -// the various plug-ins' contents. -IPC_MESSAGE_ROUTED2(PluginHostMsg_AcceleratedSurfaceBuffersSwapped, - gfx::PluginWindowHandle /* window */, - uint64 /* surface_id */) -#endif - -IPC_MESSAGE_CONTROL1(PluginHostMsg_ClearSiteDataResult, - bool /* success */) - -IPC_MESSAGE_ROUTED2(PluginHostMsg_URLRedirectResponse, - bool /* allow */, - int /* resource_id */) - - -//----------------------------------------------------------------------------- -// NPObject messages -// These are messages used to marshall NPObjects. They are sent both from the -// plugin to the renderer and from the renderer to the plugin. -IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Release) - -IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_HasMethod, - NPIdentifier_Param /* name */, - bool /* result */) - -IPC_SYNC_MESSAGE_ROUTED3_2(NPObjectMsg_Invoke, - bool /* is_default */, - NPIdentifier_Param /* method */, - std::vector<NPVariant_Param> /* args */, - NPVariant_Param /* result_param */, - bool /* result */) - -IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_HasProperty, - NPIdentifier_Param /* name */, - bool /* result */) - -IPC_SYNC_MESSAGE_ROUTED1_2(NPObjectMsg_GetProperty, - NPIdentifier_Param /* name */, - NPVariant_Param /* property */, - bool /* result */) - -IPC_SYNC_MESSAGE_ROUTED2_1(NPObjectMsg_SetProperty, - NPIdentifier_Param /* name */, - NPVariant_Param /* property */, - bool /* result */) - -IPC_SYNC_MESSAGE_ROUTED1_1(NPObjectMsg_RemoveProperty, - NPIdentifier_Param /* name */, - bool /* result */) - -IPC_SYNC_MESSAGE_ROUTED0_0(NPObjectMsg_Invalidate) - -IPC_SYNC_MESSAGE_ROUTED0_2(NPObjectMsg_Enumeration, - std::vector<NPIdentifier_Param> /* value */, - bool /* result */) - -IPC_SYNC_MESSAGE_ROUTED1_2(NPObjectMsg_Construct, - std::vector<NPVariant_Param> /* args */, - NPVariant_Param /* result_param */, - bool /* result */) - -IPC_SYNC_MESSAGE_ROUTED2_2(NPObjectMsg_Evaluate, - std::string /* script */, - bool /* popups_allowed */, - NPVariant_Param /* result_param */, - bool /* result */) diff --git a/chrome/common/webkit_param_traits.h b/chrome/common/webkit_param_traits.h index 11a3aac..8f7fb6b 100644 --- a/chrome/common/webkit_param_traits.h +++ b/chrome/common/webkit_param_traits.h @@ -30,7 +30,6 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h" -#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextCheckingResult.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextDirection.h" @@ -81,57 +80,6 @@ struct ParamTraits<WebKit::WebFindOptions> { }; template <> -struct ParamTraits<WebKit::WebInputEvent::Type> { - typedef WebKit::WebInputEvent::Type param_type; - static void Write(Message* m, const param_type& p) { - m->WriteInt(p); - } - static bool Read(const Message* m, void** iter, param_type* p) { - int type; - if (!m->ReadInt(iter, &type)) - return false; - *p = static_cast<WebKit::WebInputEvent::Type>(type); - return true; - } - static void Log(const param_type& p, std::string* l) { - const char* type; - switch (p) { - case WebKit::WebInputEvent::MouseDown: - type = "MouseDown"; - break; - case WebKit::WebInputEvent::MouseUp: - type = "MouseUp"; - break; - case WebKit::WebInputEvent::MouseMove: - type = "MouseMove"; - break; - case WebKit::WebInputEvent::MouseLeave: - type = "MouseLeave"; - break; - case WebKit::WebInputEvent::MouseEnter: - type = "MouseEnter"; - break; - case WebKit::WebInputEvent::MouseWheel: - type = "MouseWheel"; - break; - case WebKit::WebInputEvent::RawKeyDown: - type = "RawKeyDown"; - break; - case WebKit::WebInputEvent::KeyDown: - type = "KeyDown"; - break; - case WebKit::WebInputEvent::KeyUp: - type = "KeyUp"; - break; - default: - type = "None"; - break; - } - LogParam(std::string(type), l); - } -}; - -template <> struct ParamTraits<WebKit::WebCache::UsageStats> { typedef WebKit::WebCache::UsageStats param_type; static void Write(Message* m, const param_type& p) { diff --git a/chrome/plugin/npobject_proxy.cc b/chrome/plugin/npobject_proxy.cc index e4329e4..31f4657 100644 --- a/chrome/plugin/npobject_proxy.cc +++ b/chrome/plugin/npobject_proxy.cc @@ -4,9 +4,9 @@ #include "chrome/plugin/npobject_proxy.h" -#include "chrome/common/plugin_messages.h" #include "chrome/plugin/npobject_util.h" #include "chrome/plugin/plugin_channel.h" +#include "content/common/plugin_messages.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" #include "webkit/glue/webkit_glue.h" #include "webkit/plugins/npapi/plugin_instance.h" diff --git a/chrome/plugin/npobject_stub.cc b/chrome/plugin/npobject_stub.cc index 4a5a8e2..128b7da 100644 --- a/chrome/plugin/npobject_stub.cc +++ b/chrome/plugin/npobject_stub.cc @@ -5,10 +5,10 @@ #include "chrome/plugin/npobject_stub.h" #include "chrome/common/child_process_logging.h" -#include "chrome/common/plugin_messages.h" #include "chrome/plugin/npobject_util.h" #include "chrome/plugin/plugin_channel_base.h" #include "chrome/plugin/plugin_thread.h" +#include "content/common/plugin_messages.h" #include "third_party/npapi/bindings/npapi.h" #include "third_party/npapi/bindings/npruntime.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" diff --git a/chrome/plugin/npobject_util.cc b/chrome/plugin/npobject_util.cc index 902373e..8e401b0 100644 --- a/chrome/plugin/npobject_util.cc +++ b/chrome/plugin/npobject_util.cc @@ -5,9 +5,9 @@ #include "chrome/plugin/npobject_util.h" #include "base/string_util.h" -#include "chrome/common/plugin_messages.h" #include "chrome/plugin/npobject_proxy.h" #include "chrome/plugin/plugin_channel_base.h" +#include "content/common/plugin_messages.h" #include "third_party/npapi/bindings/nphostapi.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" #include "webkit/plugins/npapi/plugin_host.h" diff --git a/chrome/plugin/plugin_channel.cc b/chrome/plugin/plugin_channel.cc index 68d868f..333f99a 100644 --- a/chrome/plugin/plugin_channel.cc +++ b/chrome/plugin/plugin_channel.cc @@ -10,12 +10,12 @@ #include "base/synchronization/lock.h" #include "base/synchronization/waitable_event.h" #include "build/build_config.h" -#include "chrome/common/plugin_messages.h" #include "chrome/common/chrome_switches.h" #include "chrome/plugin/plugin_thread.h" #include "chrome/plugin/webplugin_delegate_stub.h" #include "chrome/plugin/webplugin_proxy.h" #include "content/common/child_process.h" +#include "content/common/plugin_messages.h" #include "webkit/plugins/npapi/plugin_instance.h" #if defined(OS_POSIX) diff --git a/chrome/plugin/plugin_interpose_util_mac.mm b/chrome/plugin/plugin_interpose_util_mac.mm index e0dec61..625fc0b 100644 --- a/chrome/plugin/plugin_interpose_util_mac.mm +++ b/chrome/plugin/plugin_interpose_util_mac.mm @@ -7,8 +7,8 @@ #import <AppKit/AppKit.h> #import <objc/runtime.h> -#include "chrome/common/plugin_messages.h" #include "chrome/plugin/plugin_thread.h" +#include "content/common/plugin_messages.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h" namespace mac_plugin_interposing { diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc index 9d60b0e..c6c6842 100644 --- a/chrome/plugin/plugin_thread.cc +++ b/chrome/plugin/plugin_thread.cc @@ -20,11 +20,11 @@ #include "base/process_util.h" #include "base/threading/thread_local.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/plugin_messages.h" #include "chrome/common/render_messages.h" #include "chrome/plugin/npobject_util.h" #include "chrome/renderer/render_thread.h" #include "content/common/child_process.h" +#include "content/common/plugin_messages.h" #include "ipc/ipc_channel_handle.h" #include "net/base/net_errors.h" #include "webkit/glue/webkit_glue.h" diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc index 0624e3e..bf58a96 100644 --- a/chrome/plugin/webplugin_delegate_stub.cc +++ b/chrome/plugin/webplugin_delegate_stub.cc @@ -9,11 +9,11 @@ #include "base/command_line.h" #include "chrome/common/child_process_logging.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/plugin_messages.h" #include "chrome/plugin/npobject_stub.h" #include "chrome/plugin/plugin_channel.h" #include "chrome/plugin/plugin_thread.h" #include "chrome/plugin/webplugin_proxy.h" +#include "content/common/plugin_messages.h" #include "third_party/npapi/bindings/npapi.h" #include "third_party/npapi/bindings/npruntime.h" #include "skia/ext/platform_device.h" diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc index 390b2be..e1101e0 100644 --- a/chrome/plugin/webplugin_proxy.cc +++ b/chrome/plugin/webplugin_proxy.cc @@ -11,12 +11,12 @@ #include "base/shared_memory.h" #include "build/build_config.h" #include "chrome/common/child_process_logging.h" -#include "chrome/common/plugin_messages.h" #include "chrome/common/url_constants.h" #include "chrome/plugin/npobject_proxy.h" #include "chrome/plugin/npobject_util.h" #include "chrome/plugin/plugin_channel.h" #include "chrome/plugin/plugin_thread.h" +#include "content/common/plugin_messages.h" #include "skia/ext/platform_device.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" #include "ui/gfx/blit.h" diff --git a/chrome/renderer/command_buffer_proxy.cc b/chrome/renderer/command_buffer_proxy.cc index 3de46bf..c656d3e 100644 --- a/chrome/renderer/command_buffer_proxy.cc +++ b/chrome/renderer/command_buffer_proxy.cc @@ -6,12 +6,12 @@ #include "base/process_util.h" #include "base/shared_memory.h" #include "base/task.h" -#include "chrome/common/plugin_messages.h" #include "chrome/common/render_messages.h" #include "chrome/renderer/command_buffer_proxy.h" #include "chrome/renderer/plugin_channel_host.h" #include "chrome/renderer/render_thread.h" #include "content/common/gpu_messages.h" +#include "content/common/plugin_messages.h" #include "gpu/command_buffer/common/cmd_buffer_common.h" #include "ui/gfx/size.h" diff --git a/chrome/renderer/plugin_channel_host.cc b/chrome/renderer/plugin_channel_host.cc index 5cce308..7e2a932 100644 --- a/chrome/renderer/plugin_channel_host.cc +++ b/chrome/renderer/plugin_channel_host.cc @@ -4,8 +4,8 @@ #include "chrome/renderer/plugin_channel_host.h" -#include "chrome/common/plugin_messages.h" #include "chrome/plugin/npobject_base.h" +#include "content/common/plugin_messages.h" #if defined(OS_POSIX) #include "ipc/ipc_channel_posix.h" diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc index cd8dc46..d775154 100644 --- a/chrome/renderer/render_thread.cc +++ b/chrome/renderer/render_thread.cc @@ -28,7 +28,6 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_localization_peer.h" #include "chrome/common/extensions/extension_set.h" -#include "chrome/common/plugin_messages.h" #include "chrome/common/render_messages.h" #include "chrome/common/render_messages_params.h" #include "chrome/common/renderer_preferences.h" @@ -66,6 +65,7 @@ #include "content/common/database_messages.h" #include "content/common/db_message_filter.h" #include "content/common/gpu_messages.h" +#include "content/common/plugin_messages.h" #include "content/common/resource_dispatcher.h" #include "content/common/resource_messages.h" #include "content/common/web_database_observer_impl.h" diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index f4ad26a..0d1ac5b 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -21,7 +21,6 @@ #include "base/sys_info.h" #include "base/utf_string_conversions.h" #include "chrome/common/child_process_logging.h" -#include "chrome/common/plugin_messages.h" #include "chrome/common/render_messages.h" #include "chrome/plugin/npobject_proxy.h" #include "chrome/plugin/npobject_stub.h" @@ -30,6 +29,7 @@ #include "chrome/renderer/plugin_channel_host.h" #include "chrome/renderer/render_thread.h" #include "chrome/renderer/render_view.h" +#include "content/common/plugin_messages.h" #include "grit/generated_resources.h" #include "grit/renderer_resources.h" #include "ipc/ipc_channel_handle.h" |