summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 18:06:36 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 18:06:36 +0000
commit0aed2f55c27f391d56f4d2e027578e5722d3b3bc (patch)
tree6261a825a2afb58f1b82f477d3ecd7e966a322af /chrome/common
parent43bf4fa977612da47f84b4f56ac7cf38256f52f5 (diff)
downloadchromium_src-0aed2f55c27f391d56f4d2e027578e5722d3b3bc.zip
chromium_src-0aed2f55c27f391d56f4d2e027578e5722d3b3bc.tar.gz
chromium_src-0aed2f55c27f391d56f4d2e027578e5722d3b3bc.tar.bz2
Move a bunch of renderer->browser messages to content.
TBR=tsepez Review URL: http://codereview.chromium.org/6721021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79152 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/common_param_traits.cc40
-rw-r--r--chrome/common/common_param_traits.h39
-rw-r--r--chrome/common/render_messages.cc154
-rw-r--r--chrome/common/render_messages.h468
-rw-r--r--chrome/common/render_messages_params.cc345
-rw-r--r--chrome/common/render_messages_params.h256
-rw-r--r--chrome/common/webkit_param_traits.cc63
-rw-r--r--chrome/common/webkit_param_traits.h23
-rw-r--r--chrome/common/window_container_type.cc41
-rw-r--r--chrome/common/window_container_type.h36
10 files changed, 1 insertions, 1464 deletions
diff --git a/chrome/common/common_param_traits.cc b/chrome/common/common_param_traits.cc
index a20d987..415ff73 100644
--- a/chrome/common/common_param_traits.cc
+++ b/chrome/common/common_param_traits.cc
@@ -14,7 +14,6 @@
#include "printing/backend/print_backend.h"
#include "printing/native_metafile.h"
#include "printing/page_range.h"
-#include "webkit/glue/password_form.h"
namespace IPC {
@@ -149,45 +148,6 @@ void ParamTraits<ThumbnailScore>::Log(const param_type& p, std::string* l) {
p.boring_score, p.good_clipping, p.at_top));
}
-void ParamTraits<webkit_glue::PasswordForm>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.signon_realm);
- WriteParam(m, p.origin);
- WriteParam(m, p.action);
- WriteParam(m, p.submit_element);
- WriteParam(m, p.username_element);
- WriteParam(m, p.username_value);
- WriteParam(m, p.password_element);
- WriteParam(m, p.password_value);
- WriteParam(m, p.old_password_element);
- WriteParam(m, p.old_password_value);
- WriteParam(m, p.ssl_valid);
- WriteParam(m, p.preferred);
- WriteParam(m, p.blacklisted_by_user);
-}
-
-bool ParamTraits<webkit_glue::PasswordForm>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->signon_realm) &&
- ReadParam(m, iter, &p->origin) &&
- ReadParam(m, iter, &p->action) &&
- ReadParam(m, iter, &p->submit_element) &&
- ReadParam(m, iter, &p->username_element) &&
- ReadParam(m, iter, &p->username_value) &&
- ReadParam(m, iter, &p->password_element) &&
- ReadParam(m, iter, &p->password_value) &&
- ReadParam(m, iter, &p->old_password_element) &&
- ReadParam(m, iter, &p->old_password_value) &&
- ReadParam(m, iter, &p->ssl_valid) &&
- ReadParam(m, iter, &p->preferred) &&
- ReadParam(m, iter, &p->blacklisted_by_user);
-}
-void ParamTraits<webkit_glue::PasswordForm>::Log(const param_type& p,
- std::string* l) {
- l->append("<PasswordForm>");
-}
-
void ParamTraits<printing::PageRange>::Write(Message* m, const param_type& p) {
WriteParam(m, p.from);
WriteParam(m, p.to);
diff --git a/chrome/common/common_param_traits.h b/chrome/common/common_param_traits.h
index 73207ec..1468a52 100644
--- a/chrome/common/common_param_traits.h
+++ b/chrome/common/common_param_traits.h
@@ -17,15 +17,6 @@
#include "chrome/common/content_settings.h"
#include "ipc/ipc_message_utils.h"
#include "printing/native_metafile.h"
-// !!! WARNING: DO NOT ADD NEW WEBKIT DEPENDENCIES !!!
-//
-// That means don't add #includes to any file in 'webkit/' or
-// 'third_party/WebKit/'. Chrome Frame and NACL build parts of base/ and
-// chrome/common/ for a mini-library that doesn't depend on webkit.
-//
-// TODO(erg): The following headers are historical and only work because
-// their definitions are inlined, which also needs to be fixed.
-#include "webkit/glue/window_open_disposition.h"
// Forward declarations.
class DictionaryValue;
@@ -38,10 +29,6 @@ struct PageRange;
struct PrinterCapsAndDefaults;
} // namespace printing
-namespace webkit_glue {
-struct PasswordForm;
-} // namespace webkit_glue
-
namespace IPC {
template <>
@@ -81,24 +68,6 @@ struct ParamTraits<ContentSettings> {
};
template <>
-struct ParamTraits<WindowOpenDisposition> {
- typedef WindowOpenDisposition param_type;
- static void Write(Message* m, const param_type& p) {
- WriteParam(m, static_cast<int>(p));
- }
- static bool Read(const Message* m, void** iter, param_type* r) {
- int value;
- if (!ReadParam(m, iter, &value))
- return false;
- *r = static_cast<param_type>(value);
- return true;
- }
- static void Log(const param_type& p, std::string* l) {
- LogParam(static_cast<int>(p), l);
- }
-};
-
-template <>
struct ParamTraits<WebApplicationInfo> {
typedef WebApplicationInfo param_type;
static void Write(Message* m, const param_type& p);
@@ -115,14 +84,6 @@ struct ParamTraits<ThumbnailScore> {
};
template <>
-struct ParamTraits<webkit_glue::PasswordForm> {
- typedef webkit_glue::PasswordForm 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<printing::PageRange> {
typedef printing::PageRange param_type;
static void Write(Message* m, const param_type& p);
diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc
index bf77ae0..8076ea8 100644
--- a/chrome/common/render_messages.cc
+++ b/chrome/common/render_messages.cc
@@ -35,130 +35,6 @@ namespace IPC {
namespace IPC {
-#if defined(OS_MACOSX)
-void ParamTraits<FontDescriptor>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.font_name);
- WriteParam(m, p.font_point_size);
-}
-
-bool ParamTraits<FontDescriptor>::Read(const Message* m,
- void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->font_name) &&
- ReadParam(m, iter, &p->font_point_size);
-}
-
-void ParamTraits<FontDescriptor>::Log(const param_type& p, std::string* l) {
- l->append("<FontDescriptor>");
-}
-#endif
-
-void ParamTraits<webkit::npapi::WebPluginGeometry>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.window);
- WriteParam(m, p.window_rect);
- WriteParam(m, p.clip_rect);
- WriteParam(m, p.cutout_rects);
- WriteParam(m, p.rects_valid);
- WriteParam(m, p.visible);
-}
-
-bool ParamTraits<webkit::npapi::WebPluginGeometry>::Read(
- const Message* m, void** iter, param_type* p) {
- return
- ReadParam(m, iter, &p->window) &&
- ReadParam(m, iter, &p->window_rect) &&
- ReadParam(m, iter, &p->clip_rect) &&
- ReadParam(m, iter, &p->cutout_rects) &&
- ReadParam(m, iter, &p->rects_valid) &&
- ReadParam(m, iter, &p->visible);
-}
-
-void ParamTraits<webkit::npapi::WebPluginGeometry>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.window, l);
- l->append(", ");
- LogParam(p.window_rect, l);
- l->append(", ");
- LogParam(p.clip_rect, l);
- l->append(", ");
- LogParam(p.cutout_rects, l);
- l->append(", ");
- LogParam(p.rects_valid, l);
- l->append(", ");
- LogParam(p.visible, l);
- l->append(")");
-}
-
-void ParamTraits<webkit::npapi::WebPluginMimeType>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.mime_type);
- WriteParam(m, p.file_extensions);
- WriteParam(m, p.description);
-}
-
-bool ParamTraits<webkit::npapi::WebPluginMimeType>::Read(const Message* m,
- void** iter,
- param_type* r) {
- return
- ReadParam(m, iter, &r->mime_type) &&
- ReadParam(m, iter, &r->file_extensions) &&
- ReadParam(m, iter, &r->description);
-}
-
-void ParamTraits<webkit::npapi::WebPluginMimeType>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.mime_type, l);
- l->append(", ");
- LogParam(p.file_extensions, l);
- l->append(", ");
- LogParam(p.description, l);
- l->append(")");
-}
-
-void ParamTraits<webkit::npapi::WebPluginInfo>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.name);
- WriteParam(m, p.path);
- WriteParam(m, p.version);
- WriteParam(m, p.desc);
- WriteParam(m, p.mime_types);
- WriteParam(m, p.enabled);
-}
-
-bool ParamTraits<webkit::npapi::WebPluginInfo>::Read(const Message* m,
- void** iter,
- param_type* r) {
- return
- ReadParam(m, iter, &r->name) &&
- ReadParam(m, iter, &r->path) &&
- ReadParam(m, iter, &r->version) &&
- ReadParam(m, iter, &r->desc) &&
- ReadParam(m, iter, &r->mime_types) &&
- ReadParam(m, iter, &r->enabled);
-}
-
-void ParamTraits<webkit::npapi::WebPluginInfo>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.name, l);
- l->append(", ");
- l->append(", ");
- LogParam(p.path, l);
- l->append(", ");
- LogParam(p.version, l);
- l->append(", ");
- LogParam(p.desc, l);
- l->append(", ");
- LogParam(p.mime_types, l);
- l->append(", ");
- LogParam(p.enabled, l);
- l->append(")");
-}
-
void ParamTraits<URLPattern>::Write(Message* m, const param_type& p) {
WriteParam(m, p.valid_schemes());
WriteParam(m, p.GetAsString());
@@ -180,36 +56,6 @@ void ParamTraits<URLPattern>::Log(const param_type& p, std::string* l) {
LogParam(p.GetAsString(), l);
}
-void ParamTraits<webkit_glue::WebCookie>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.name);
- WriteParam(m, p.value);
- WriteParam(m, p.domain);
- WriteParam(m, p.path);
- WriteParam(m, p.expires);
- WriteParam(m, p.http_only);
- WriteParam(m, p.secure);
- WriteParam(m, p.session);
-}
-
-bool ParamTraits<webkit_glue::WebCookie>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->name) &&
- ReadParam(m, iter, &p->value) &&
- ReadParam(m, iter, &p->domain) &&
- ReadParam(m, iter, &p->path) &&
- ReadParam(m, iter, &p->expires) &&
- ReadParam(m, iter, &p->http_only) &&
- ReadParam(m, iter, &p->secure) &&
- ReadParam(m, iter, &p->session);
-}
-
-void ParamTraits<webkit_glue::WebCookie>::Log(const param_type& p,
- std::string* l) {
- l->append("<WebCookie>");
-}
-
void ParamTraits<ExtensionExtent>::Write(Message* m, const param_type& p) {
WriteParam(m, p.patterns());
}
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index d552ad4..924b7cf 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -34,7 +34,6 @@
#include "chrome/common/view_types.h"
#include "chrome/common/web_apps.h"
#include "chrome/common/webkit_param_traits.h"
-#include "chrome/common/window_container_type.h"
#include "content/common/common_param_traits.h"
#include "content/common/css_colors.h"
#include "content/common/notification_type.h"
@@ -47,23 +46,15 @@
#include "ipc/ipc_platform_file.h" // ifdefed typedef.
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/rect.h"
#include "webkit/glue/webaccessibility.h"
-#include "webkit/glue/webcookie.h"
#include "webkit/glue/webcursor.h"
-#include "webkit/plugins/npapi/webplugin.h"
-#include "webkit/plugins/npapi/webplugininfo.h"
#if defined(OS_POSIX)
#include "base/file_descriptor_posix.h"
#endif
-#if defined(OS_MACOSX)
-#include "content/common/font_descriptor_mac.h"
-#endif
-
// TODO(mpcomplete): rename ViewMsg and ViewHostMsg to something that makes
// more sense with our current design.
@@ -99,42 +90,6 @@ enum ViewHostMsg_JavaScriptStressTestControl_Commands {
namespace IPC {
-#if defined(OS_MACOSX)
-// Traits for FontDescriptor structure to pack/unpack.
-template <>
-struct ParamTraits<FontDescriptor> {
- typedef FontDescriptor 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);
-};
-#endif
-
-template <>
-struct ParamTraits<webkit::npapi::WebPluginGeometry> {
- typedef webkit::npapi::WebPluginGeometry 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);
-};
-
-// Traits for ViewMsg_GetPlugins_Reply structure to pack/unpack.
-template <>
-struct ParamTraits<webkit::npapi::WebPluginMimeType> {
- typedef webkit::npapi::WebPluginMimeType 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);
-};
-
-template <>
-struct ParamTraits<webkit::npapi::WebPluginInfo> {
- typedef webkit::npapi::WebPluginInfo 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);
-};
-
#if defined(OS_POSIX)
// TODO(port): this shouldn't exist. However, the plugin stuff is really using
@@ -174,15 +129,6 @@ struct ParamTraits<URLPattern> {
static void Log(const param_type& p, std::string* l);
};
-// Traits for WebCookie
-template <>
-struct ParamTraits<webkit_glue::WebCookie> {
- typedef webkit_glue::WebCookie 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 SimilarTypeTraits<TranslateErrors::Type> {
typedef int Type;
@@ -559,283 +505,9 @@ IPC_MESSAGE_ROUTED1(ViewMsg_StartPhishingDetection, GURL)
// TabContents messages
// These are messages sent from the renderer to the browser process.
-// Sent by the renderer when it is creating a new window. The browser creates
-// a tab for it and responds with a ViewMsg_CreatingNew_ACK. If route_id is
-// MSG_ROUTING_NONE, the view couldn't be created.
-IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_CreateWindow,
- ViewHostMsg_CreateWindow_Params,
- int /* route_id */,
- int64 /* cloned_session_storage_namespace_id */)
-
-// Similar to ViewHostMsg_CreateWindow, except used for sub-widgets, like
-// <select> dropdowns. This message is sent to the TabContents that
-// contains the widget being created.
-IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CreateWidget,
- int /* opener_id */,
- WebKit::WebPopupType /* popup type */,
- int /* route_id */)
-
-// Similar to ViewHostMsg_CreateWidget except the widget is a full screen
-// window.
-IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_CreateFullscreenWidget,
- int /* opener_id */,
- int /* route_id */)
-
-// These three messages are sent to the parent RenderViewHost to display the
-// page/widget that was created by
-// CreateWindow/CreateWidget/CreateFullscreenWidget. routing_id
-// refers to the id that was returned from the Create message above.
-// The initial_position parameter is a rectangle in screen coordinates.
-//
-// FUTURE: there will probably be flags here to control if the result is
-// in a new window.
-IPC_MESSAGE_ROUTED4(ViewHostMsg_ShowView,
- int /* route_id */,
- WindowOpenDisposition /* disposition */,
- gfx::Rect /* initial_pos */,
- bool /* opened_by_user_gesture */)
-
-IPC_MESSAGE_ROUTED2(ViewHostMsg_ShowWidget,
- int /* route_id */,
- gfx::Rect /* initial_pos */)
-
-// Message to show a full screen widget.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_ShowFullscreenWidget,
- int /* route_id */)
-
-// This message is sent after ViewHostMsg_ShowView to cause the RenderView
-// to run in a modal fashion until it is closed.
-IPC_SYNC_MESSAGE_ROUTED0_0(ViewHostMsg_RunModal)
-
IPC_MESSAGE_CONTROL1(ViewHostMsg_UpdatedCacheStats,
WebKit::WebCache::UsageStats /* stats */)
-// Indicates the renderer is ready in response to a ViewMsg_New or
-// a ViewMsg_CreatingNew_ACK.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_RenderViewReady)
-
-
-// Indicates the renderer process is gone. This actually is sent by the
-// browser process to itself, but keeps the interface cleaner.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_RenderViewGone,
- int, /* this really is base::TerminationStatus */
- int /* exit_code */)
-
-// Sent by the renderer process to request that the browser close the view.
-// This corresponds to the window.close() API, and the browser may ignore
-// this message. Otherwise, the browser will generates a ViewMsg_Close
-// message to close the view.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_Close)
-
-// Sent by the renderer process to request that the browser move the view.
-// This corresponds to the window.resizeTo() and window.moveTo() APIs, and
-// the browser may ignore this message.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_RequestMove,
- gfx::Rect /* position */)
-
-// Notifies the browser that a frame in the view has changed. This message
-// has a lot of parameters and is packed/unpacked by functions defined in
-// render_messages.h.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_FrameNavigate,
- ViewHostMsg_FrameNavigate_Params)
-
-// Notifies the browser that we have session history information.
-// page_id: unique ID that allows us to distinguish between history entries.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateState,
- int32 /* page_id */,
- std::string /* state */)
-
-// Notifies the browser that a document has been loaded in a frame.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentLoadedInFrame,
- int64 /* frame_id */)
-
-// Notifies the browser that a frame finished loading.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DidFinishLoad,
- int64 /* frame_id */)
-
-// Changes the title for the page in the UI when the page is navigated or the
-// title changes.
-// TODO(darin): use a UTF-8 string to reduce data size
-IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTitle, int32, std::wstring)
-
-// Changes the icon url for the page in the UI.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateIconURL, int32, GURL)
-
-// Change the encoding name of the page in UI when the page has detected
-// proper encoding name.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateEncoding,
- std::string /* new encoding name */)
-
-// Notifies the browser that we want to show a destination url for a potential
-// action (e.g. when the user is hovering over a link).
-IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateTargetURL, int32, GURL)
-
-// Sent when the renderer starts loading the page. This corresponds to
-// WebKit's notion of the throbber starting. Note that sometimes you may get
-// duplicates of these during a single load.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStartLoading)
-
-// Sent when the renderer is done loading a page. This corresponds to WebKit's
-// notion of the throbber stopping.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_DidStopLoading)
-
-// Sent when the renderer main frame has made progress loading.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DidChangeLoadProgress,
- double /* load_progress */)
-
-// Sent when the document element is available for the toplevel frame. This
-// happens after the page starts loading, but before all resources are
-// finished.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_DocumentAvailableInMainFrame)
-
-// Sent when after the onload handler has been invoked for the document
-// in the toplevel frame.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DocumentOnLoadCompletedInMainFrame,
- int32 /* page_id */)
-
-// Sent when the renderer loads a resource from its memory cache.
-// The security info is non empty if the resource was originally loaded over
-// a secure connection.
-// Note: May only be sent once per URL per frame per committed load.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_DidLoadResourceFromMemoryCache,
- GURL /* url */,
- std::string /* security info */)
-
-// Sent when the renderer displays insecure content in a secure page.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_DidDisplayInsecureContent)
-
-// Sent when the renderer runs insecure content in a secure origin.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_DidRunInsecureContent,
- std::string /* security_origin */,
- GURL /* target URL */)
-
-// Sent when the renderer starts a provisional load for a frame.
-IPC_MESSAGE_ROUTED3(ViewHostMsg_DidStartProvisionalLoadForFrame,
- int64 /* frame_id */,
- bool /* true if it is the main frame */,
- GURL /* url */)
-
-// Sent when the renderer fails a provisional load with an error.
-IPC_MESSAGE_ROUTED5(ViewHostMsg_DidFailProvisionalLoadWithError,
- int64 /* frame_id */,
- bool /* true if it is the main frame */,
- int /* error_code */,
- GURL /* url */,
- bool /* true if the failure is the result of
- navigating to a POST again and we're going to
- show the POST interstitial */)
-
-// Tells the render view that a ViewHostMsg_PaintAtSize message was
-// processed, and the DIB is ready for use. |tag| has the same value that
-// the tag sent along with ViewMsg_PaintAtSize.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_PaintAtSize_ACK,
- int /* tag */,
- gfx::Size /* size */)
-
-// Sent to update part of the view. In response to this message, the host
-// generates a ViewMsg_UpdateRect_ACK message.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_UpdateRect,
- ViewHostMsg_UpdateRect_Params)
-
-// Sent by the renderer when accelerated compositing is enabled or disabled to
-// notify the browser whether or not is should do painting.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DidActivateAcceleratedCompositing,
- bool /* true if the accelerated compositor is actve */)
-
-// Acknowledges receipt of a ViewMsg_HandleInputEvent message.
-// Payload is a WebInputEvent::Type which is the type of the event, followed
-// by an optional WebInputEvent which is provided only if the event was not
-// processed.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_HandleInputEvent_ACK)
-
-IPC_MESSAGE_ROUTED0(ViewHostMsg_Focus)
-IPC_MESSAGE_ROUTED0(ViewHostMsg_Blur)
-
-// Message sent from renderer to the browser when focus changes inside the
-// webpage. The parameter says whether the newly focused element needs
-// keyboard input (true for textfields, text areas and content editable divs).
-IPC_MESSAGE_ROUTED1(ViewHostMsg_FocusedNodeChanged,
- bool /* is_editable_node */)
-
-// Returns the window location of the given window.
-// TODO(shess): Provide a mapping from reply_msg->routing_id() to
-// HWND so that we can eliminate the NativeViewId parameter.
-IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetWindowRect,
- gfx::NativeViewId /* window */,
- gfx::Rect /* Out: Window location */)
-
-IPC_MESSAGE_ROUTED1(ViewHostMsg_SetCursor, WebCursor)
-
-// Used to set a cookie. The cookie is set asynchronously, but will be
-// available to a subsequent ViewHostMsg_GetCookies request.
-IPC_MESSAGE_ROUTED3(ViewHostMsg_SetCookie,
- GURL /* url */,
- GURL /* first_party_for_cookies */,
- std::string /* cookie */)
-
-// Used to get cookies for the given URL. This may block waiting for a
-// previous SetCookie message to be processed.
-IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetCookies,
- GURL /* url */,
- GURL /* first_party_for_cookies */,
- std::string /* cookies */)
-
-// Used to get raw cookie information for the given URL. This may block
-// waiting for a previous SetCookie message to be processed.
-IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_GetRawCookies,
- GURL /* url */,
- GURL /* first_party_for_cookies */,
- std::vector<webkit_glue::WebCookie>
- /* raw_cookies */)
-
-// Used to delete cookie for the given URL and name
-IPC_SYNC_MESSAGE_CONTROL2_0(ViewHostMsg_DeleteCookie,
- GURL /* url */,
- std::string /* cookie_name */)
-
-// Used to check if cookies are enabled for the given URL. This may block
-// waiting for a previous SetCookie message to be processed.
-IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_CookiesEnabled,
- GURL /* url */,
- GURL /* first_party_for_cookies */,
- bool /* cookies_enabled */)
-
-// Used to get the list of plugins
-IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins,
- bool /* refresh*/,
- std::vector<webkit::npapi::WebPluginInfo> /* plugins */)
-
-// Return information about a plugin for the given URL and MIME
-// type. If there is no matching plugin, |found| is false. If
-// |enabled| in the WebPluginInfo struct is false, the plug-in is
-// treated as if it was not installed at all.
-//
-// If |setting| is set to CONTENT_SETTING_BLOCK, the plug-in is
-// blocked by the content settings for |policy_url|. It still
-// appears in navigator.plugins in Javascript though, and can be
-// loaded via click-to-play.
-//
-// If |setting| is set to CONTENT_SETTING_ALLOW, the domain is
-// explicitly white-listed for the plug-in, or the user has chosen
-// not to block nonsandboxed plugins.
-//
-// If |setting| is set to CONTENT_SETTING_DEFAULT, the plug-in is
-// neither blocked nor white-listed, which means that it's allowed
-// by default and can still be blocked if it's non-sandboxed.
-//
-// |actual_mime_type| is the actual mime type supported by the
-// plugin found that match the URL given (one for each item in
-// |info|).
-IPC_SYNC_MESSAGE_CONTROL4_4(ViewHostMsg_GetPluginInfo,
- int /* routing_id */,
- GURL /* url */,
- GURL /* policy_url */,
- std::string /* mime_type */,
- bool /* found */,
- webkit::npapi::WebPluginInfo /* plugin info */,
- ContentSetting /* setting */,
- std::string /* actual_mime_type */)
-
// Requests spellcheck for a word.
IPC_SYNC_MESSAGE_ROUTED2_2(ViewHostMsg_SpellCheck,
string16 /* word to check */,
@@ -847,7 +519,6 @@ IPC_SYNC_MESSAGE_ROUTED2_2(ViewHostMsg_SpellCheck,
IPC_SYNC_MESSAGE_ROUTED0_1(ViewHostMsg_GetDocumentTag,
int /* the tag */)
-
// This message tells the spellchecker that a document, identified by an int
// tag, has been closed and all of the ignored words for that document can be
// forgotten.
@@ -868,47 +539,6 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_ContentBlocked,
ContentSettingsType, /* type of blocked content */
std::string /* resource identifier */)
-// Tells the browser that a specific Appcache manifest in the current page
-// was accessed.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_AppCacheAccessed,
- GURL /* manifest url */,
- bool /* blocked by policy */)
-
-// Tells the browser that a specific Web database in the current page was
-// accessed.
-IPC_MESSAGE_ROUTED5(ViewHostMsg_WebDatabaseAccessed,
- GURL /* origin url */,
- string16 /* database name */,
- string16 /* database display name */,
- unsigned long /* estimated size */,
- bool /* blocked by policy */)
-
-// Initiates a download based on user actions like 'ALT+click'.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_DownloadUrl,
- GURL /* url */,
- GURL /* referrer */)
-
-// Used to go to the session history entry at the given offset (ie, -1 will
-// return the "back" item).
-IPC_MESSAGE_ROUTED1(ViewHostMsg_GoToEntryAtOffset,
- int /* offset (from current) of history item to get */)
-
-IPC_SYNC_MESSAGE_ROUTED4_2(ViewHostMsg_RunJavaScriptMessage,
- std::wstring /* in - alert message */,
- std::wstring /* in - default prompt */,
- GURL /* in - originating page URL */,
- int /* in - dialog flags */,
- bool /* out - success */,
- std::wstring /* out - prompt field */)
-
-// Provides the contents for the given page that was loaded recently.
-IPC_MESSAGE_ROUTED5(ViewHostMsg_PageContents,
- GURL /* URL of the page */,
- int32 /* page id */,
- string16 /* page contents */,
- std::string /* page ISO639_1 language code */,
- bool /* whether the page can be translated */)
-
// Used to get the extension message bundle.
IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetExtensionMessageBundle,
std::string /* extension id */,
@@ -930,16 +560,6 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_UpdateFaviconURL,
int32 /* page_id */,
GURL /* url of the favicon */)
-// Requests that the given URL be opened in the specified manner.
-IPC_MESSAGE_ROUTED3(ViewHostMsg_OpenURL,
- GURL /* url */,
- GURL /* referrer */,
- WindowOpenDisposition /* disposition */)
-
-// Notifies that the preferred size of the content changed.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_DidContentsPreferredSizeChange,
- gfx::Size /* pref_size */)
-
// Following message is used to communicate the values received by the
// callback binding the JS to Cpp.
// An instance of browser that has an automation host listening to it can
@@ -949,39 +569,12 @@ IPC_MESSAGE_ROUTED2(ViewHostMsg_DomOperationResponse,
std::string /* json_string */,
int /* automation_id */)
-// A message from HTML-based UI. When (trusted) Javascript calls
-// send(message, args), this message is sent to the browser.
-IPC_MESSAGE_ROUTED3(ViewHostMsg_WebUISend,
- GURL /* source_url */,
- std::string /* message */,
- std::string /* args (as a JSON string) */)
-
// A message for an external host.
IPC_MESSAGE_ROUTED3(ViewHostMsg_ForwardMessageToExternalHost,
std::string /* message */,
std::string /* origin */,
std::string /* target */)
-// A renderer sends this to the browser process when it wants to
-// create a plugin. The browser will create the plugin process if
-// necessary, and will return a handle to the channel on success.
-// On error an empty string is returned.
-IPC_SYNC_MESSAGE_CONTROL3_2(ViewHostMsg_OpenChannelToPlugin,
- int /* routing_id */,
- GURL /* url */,
- std::string /* mime_type */,
- IPC::ChannelHandle /* channel_handle */,
- webkit::npapi::WebPluginInfo /* info */)
-
-// A renderer sends this to the browser process when it wants to
-// create a pepper plugin. The browser will create the plugin process if
-// necessary, and will return a handle to the channel on success.
-// On error an empty string is returned.
-IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_OpenChannelToPepperPlugin,
- FilePath /* path */,
- base::ProcessHandle /* plugin_process_handle */,
- IPC::ChannelHandle /* handle to channel */)
-
// A renderer sends this to the browser process when it wants to start
// a new instance of the Native Client process. The browser will launch
// the process and return a handle to an IMC channel.
@@ -993,60 +586,6 @@ IPC_SYNC_MESSAGE_CONTROL2_3(ViewHostMsg_LaunchNaCl,
base::ProcessHandle /* NaCl process handle */,
base::ProcessId /* NaCl process id */)
-#if defined(USE_X11)
-// A renderer sends this when it needs a browser-side widget for
-// hosting a windowed plugin. id is the XID of the plugin window, for which
-// the container is created.
-IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_CreatePluginContainer,
- gfx::PluginWindowHandle /* id */)
-
-// Destroy a plugin container previously created using CreatePluginContainer.
-// id is the XID of the plugin window corresponding to the container that is
-// to be destroyed.
-IPC_SYNC_MESSAGE_ROUTED1_0(ViewHostMsg_DestroyPluginContainer,
- gfx::PluginWindowHandle /* id */)
-#endif
-
-#if defined(OS_MACOSX)
-// Request that the browser load a font into shared memory for us.
-IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_LoadFont,
- FontDescriptor /* font to load */,
- uint32 /* buffer size */,
- base::SharedMemoryHandle /* font data */)
-#endif
-
-#if defined(OS_WIN)
-// Request that the given font be loaded by the browser so it's cached by the
-// OS. Please see ChildProcessHost::PreCacheFont for details.
-IPC_SYNC_MESSAGE_CONTROL1_0(ViewHostMsg_PreCacheFont,
- LOGFONT /* font data */)
-#endif // defined(OS_WIN)
-
-// Returns WebScreenInfo corresponding to the view.
-// TODO(shess): Provide a mapping from reply_msg->routing_id() to
-// HWND so that we can eliminate the NativeViewId parameter.
-IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetScreenInfo,
- gfx::NativeViewId /* view */,
- WebKit::WebScreenInfo /* results */)
-
-// Send the tooltip text for the current mouse position to the browser.
-IPC_MESSAGE_ROUTED2(ViewHostMsg_SetTooltipText,
- std::wstring /* tooltip text string */,
- WebKit::WebTextDirection /* text direction hint */)
-
-// Notification that the text selection has changed.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_SelectionChanged,
- std::string /* currently selected text */)
-
-// Asks the browser to display the file chooser. The result is returned in a
-// ViewHost_RunFileChooserResponse message.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_RunFileChooser,
- ViewHostMsg_RunFileChooser_Params)
-
-// Tells the browser to move the focus to the next (previous if reverse is
-// true) focusable element.
-IPC_MESSAGE_ROUTED1(ViewHostMsg_TakeFocus, bool /* reverse */)
-
// Notification that the page has an OpenSearch description document
// associated with it.
IPC_MESSAGE_ROUTED3(ViewHostMsg_PageHasOSDD,
@@ -1281,13 +820,6 @@ IPC_MESSAGE_CONTROL1(ViewHostMsg_ResourceTypeStats,
IPC_MESSAGE_CONTROL1(ViewHostMsg_SuddenTerminationChanged,
bool /* enabled */)
-// Returns the window location of the window this widget is embeded.
-// TODO(shess): Provide a mapping from reply_msg->routing_id() to
-// HWND so that we can eliminate the NativeViewId parameter.
-IPC_SYNC_MESSAGE_ROUTED1_1(ViewHostMsg_GetRootWindowRect,
- gfx::NativeViewId /* window */,
- gfx::Rect /* Out: Window location */)
-
// A renderer sends this message when an extension process starts an API
// request. The browser will always respond with a ViewMsg_ExtensionResponse.
IPC_MESSAGE_ROUTED1(ViewHostMsg_ExtensionRequest,
diff --git a/chrome/common/render_messages_params.cc b/chrome/common/render_messages_params.cc
index 4a60180..eb5d8a0 100644
--- a/chrome/common/render_messages_params.cc
+++ b/chrome/common/render_messages_params.cc
@@ -9,32 +9,6 @@
#include "chrome/common/render_messages.h"
#include "net/base/upload_data.h"
-ViewHostMsg_FrameNavigate_Params::ViewHostMsg_FrameNavigate_Params()
- : page_id(0),
- frame_id(0),
- transition(PageTransition::TYPED),
- should_update_history(false),
- gesture(NavigationGestureUser),
- is_post(false),
- was_within_same_page(false),
- http_status_code(0),
- was_fetched_via_proxy(false) {
-}
-
-ViewHostMsg_FrameNavigate_Params::~ViewHostMsg_FrameNavigate_Params() {
-}
-
-ViewHostMsg_UpdateRect_Params::ViewHostMsg_UpdateRect_Params()
- : dx(0),
- dy(0),
- flags(0) {
- // On windows, bitmap is of type "struct HandleAndSequenceNum"
- memset(&bitmap, 0, sizeof(bitmap));
-}
-
-ViewHostMsg_UpdateRect_Params::~ViewHostMsg_UpdateRect_Params() {
-}
-
ViewMsg_Print_Params::ViewMsg_Print_Params()
: margin_top(0),
margin_left(0),
@@ -147,24 +121,6 @@ ViewMsg_ExecuteCode_Params::ViewMsg_ExecuteCode_Params(
ViewMsg_ExecuteCode_Params::~ViewMsg_ExecuteCode_Params() {
}
-ViewHostMsg_CreateWindow_Params::ViewHostMsg_CreateWindow_Params()
- : opener_id(0),
- user_gesture(false),
- window_container_type(WINDOW_CONTAINER_TYPE_NORMAL),
- session_storage_namespace_id(0),
- opener_frame_id(0) {
-}
-
-ViewHostMsg_CreateWindow_Params::~ViewHostMsg_CreateWindow_Params() {
-}
-
-ViewHostMsg_RunFileChooser_Params::ViewHostMsg_RunFileChooser_Params()
- : mode(Open) {
-}
-
-ViewHostMsg_RunFileChooser_Params::~ViewHostMsg_RunFileChooser_Params() {
-}
-
ViewHostMsg_DomMessage_Params::ViewHostMsg_DomMessage_Params()
: request_id(0),
has_callback(false),
@@ -247,57 +203,6 @@ scoped_refptr<Extension>
namespace IPC {
-template<>
-struct ParamTraits<NavigationGesture> {
- typedef NavigationGesture 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<NavigationGesture>(type);
- return true;
- }
- static void Log(const param_type& p, std::string* l) {
- std::string event;
- switch (p) {
- case NavigationGestureUser:
- event = "GESTURE_USER";
- break;
- case NavigationGestureAuto:
- event = "GESTURE_AUTO";
- break;
- default:
- event = "GESTURE_UNKNOWN";
- break;
- }
- LogParam(event, l);
- }
-};
-
-template <>
-struct ParamTraits<WindowContainerType> {
- typedef WindowContainerType param_type;
- static void Write(Message* m, const param_type& p) {
- int val = static_cast<int>(p);
- WriteParam(m, val);
- }
- static bool Read(const Message* m, void** iter, param_type* p) {
- int val = 0;
- if (!ReadParam(m, iter, &val) ||
- val < WINDOW_CONTAINER_TYPE_NORMAL ||
- val >= WINDOW_CONTAINER_TYPE_MAX_VALUE)
- return false;
- *p = static_cast<param_type>(val);
- return true;
- }
- static void Log(const param_type& p, std::string* l) {
- ParamTraits<int>::Log(static_cast<int>(p), l);
- }
-};
-
template <>
struct ParamTraits<Extension::Location> {
typedef Extension::Location param_type;
@@ -420,151 +325,6 @@ void ParamTraits<ViewHostMsg_GetSearchProviderInstallState_Params>::Log(
LogParam(state, l);
}
-void ParamTraits<ViewHostMsg_FrameNavigate_Params>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.page_id);
- WriteParam(m, p.frame_id);
- WriteParam(m, p.url);
- WriteParam(m, p.referrer);
- WriteParam(m, p.transition);
- WriteParam(m, p.redirects);
- WriteParam(m, p.should_update_history);
- WriteParam(m, p.searchable_form_url);
- WriteParam(m, p.searchable_form_encoding);
- WriteParam(m, p.password_form);
- WriteParam(m, p.security_info);
- WriteParam(m, p.gesture);
- WriteParam(m, p.contents_mime_type);
- WriteParam(m, p.is_post);
- WriteParam(m, p.was_within_same_page);
- WriteParam(m, p.http_status_code);
- WriteParam(m, p.socket_address);
- WriteParam(m, p.was_fetched_via_proxy);
- WriteParam(m, p.content_state);
-}
-
-bool ParamTraits<ViewHostMsg_FrameNavigate_Params>::Read(const Message* m,
- void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->page_id) &&
- ReadParam(m, iter, &p->frame_id) &&
- ReadParam(m, iter, &p->url) &&
- ReadParam(m, iter, &p->referrer) &&
- ReadParam(m, iter, &p->transition) &&
- ReadParam(m, iter, &p->redirects) &&
- ReadParam(m, iter, &p->should_update_history) &&
- ReadParam(m, iter, &p->searchable_form_url) &&
- ReadParam(m, iter, &p->searchable_form_encoding) &&
- ReadParam(m, iter, &p->password_form) &&
- ReadParam(m, iter, &p->security_info) &&
- ReadParam(m, iter, &p->gesture) &&
- ReadParam(m, iter, &p->contents_mime_type) &&
- ReadParam(m, iter, &p->is_post) &&
- ReadParam(m, iter, &p->was_within_same_page) &&
- ReadParam(m, iter, &p->http_status_code) &&
- ReadParam(m, iter, &p->socket_address) &&
- ReadParam(m, iter, &p->was_fetched_via_proxy) &&
- ReadParam(m, iter, &p->content_state);
-}
-
-void ParamTraits<ViewHostMsg_FrameNavigate_Params>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.page_id, l);
- l->append(", ");
- LogParam(p.frame_id, l);
- l->append(", ");
- LogParam(p.url, l);
- l->append(", ");
- LogParam(p.referrer, l);
- l->append(", ");
- LogParam(p.transition, l);
- l->append(", ");
- LogParam(p.redirects, l);
- l->append(", ");
- LogParam(p.should_update_history, l);
- l->append(", ");
- LogParam(p.searchable_form_url, l);
- l->append(", ");
- LogParam(p.searchable_form_encoding, l);
- l->append(", ");
- LogParam(p.password_form, l);
- l->append(", ");
- LogParam(p.security_info, l);
- l->append(", ");
- LogParam(p.gesture, l);
- l->append(", ");
- LogParam(p.contents_mime_type, l);
- l->append(", ");
- LogParam(p.is_post, l);
- l->append(", ");
- LogParam(p.was_within_same_page, l);
- l->append(", ");
- LogParam(p.http_status_code, l);
- l->append(", ");
- LogParam(p.socket_address, l);
- l->append(", ");
- LogParam(p.was_fetched_via_proxy, l);
- l->append(")");
-}
-
-void ParamTraits<ViewHostMsg_UpdateRect_Params>::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.bitmap);
- WriteParam(m, p.bitmap_rect);
- WriteParam(m, p.dx);
- WriteParam(m, p.dy);
- WriteParam(m, p.scroll_rect);
- WriteParam(m, p.scroll_offset);
- WriteParam(m, p.copy_rects);
- WriteParam(m, p.view_size);
- WriteParam(m, p.resizer_rect);
- WriteParam(m, p.plugin_window_moves);
- WriteParam(m, p.flags);
-}
-
-bool ParamTraits<ViewHostMsg_UpdateRect_Params>::Read(
- const Message* m, void** iter, param_type* p) {
- return
- ReadParam(m, iter, &p->bitmap) &&
- ReadParam(m, iter, &p->bitmap_rect) &&
- ReadParam(m, iter, &p->dx) &&
- ReadParam(m, iter, &p->dy) &&
- ReadParam(m, iter, &p->scroll_rect) &&
- ReadParam(m, iter, &p->scroll_offset) &&
- ReadParam(m, iter, &p->copy_rects) &&
- ReadParam(m, iter, &p->view_size) &&
- ReadParam(m, iter, &p->resizer_rect) &&
- ReadParam(m, iter, &p->plugin_window_moves) &&
- ReadParam(m, iter, &p->flags);
-}
-
-void ParamTraits<ViewHostMsg_UpdateRect_Params>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.bitmap, l);
- l->append(", ");
- LogParam(p.bitmap_rect, l);
- l->append(", ");
- LogParam(p.dx, l);
- l->append(", ");
- LogParam(p.dy, l);
- l->append(", ");
- LogParam(p.scroll_rect, l);
- l->append(", ");
- LogParam(p.copy_rects, l);
- l->append(", ");
- LogParam(p.view_size, l);
- l->append(", ");
- LogParam(p.resizer_rect, l);
- l->append(", ");
- LogParam(p.plugin_window_moves, l);
- l->append(", ");
- LogParam(p.flags, l);
- l->append(")");
-}
-
void ParamTraits<ViewMsg_Print_Params>::Write(Message* m, const param_type& p) {
WriteParam(m, p.page_size);
WriteParam(m, p.printable_size);
@@ -752,111 +512,6 @@ void ParamTraits<ViewMsg_ExecuteCode_Params>::Log(const param_type& p,
l->append("<ViewMsg_ExecuteCode_Params>");
}
-void ParamTraits<ViewHostMsg_CreateWindow_Params>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.opener_id);
- WriteParam(m, p.user_gesture);
- WriteParam(m, p.window_container_type);
- WriteParam(m, p.session_storage_namespace_id);
- WriteParam(m, p.frame_name);
- WriteParam(m, p.opener_frame_id);
- WriteParam(m, p.opener_url);
- WriteParam(m, p.opener_security_origin);
- WriteParam(m, p.target_url);
-}
-
-bool ParamTraits<ViewHostMsg_CreateWindow_Params>::Read(const Message* m,
- void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->opener_id) &&
- ReadParam(m, iter, &p->user_gesture) &&
- ReadParam(m, iter, &p->window_container_type) &&
- ReadParam(m, iter, &p->session_storage_namespace_id) &&
- ReadParam(m, iter, &p->frame_name) &&
- ReadParam(m, iter, &p->opener_frame_id) &&
- ReadParam(m, iter, &p->opener_url) &&
- ReadParam(m, iter, &p->opener_security_origin) &&
- ReadParam(m, iter, &p->target_url);
-}
-
-void ParamTraits<ViewHostMsg_CreateWindow_Params>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.opener_id, l);
- l->append(", ");
- LogParam(p.user_gesture, l);
- l->append(", ");
- LogParam(p.window_container_type, l);
- l->append(", ");
- LogParam(p.session_storage_namespace_id, l);
- l->append(", ");
- LogParam(p.frame_name, l);
- l->append(", ");
- LogParam(p.opener_frame_id, l);
- l->append(", ");
- LogParam(p.opener_url, l);
- l->append(", ");
- LogParam(p.opener_security_origin, l);
- l->append(", ");
- LogParam(p.target_url, l);
- l->append(")");
-}
-
-void ParamTraits<ViewHostMsg_RunFileChooser_Params>::Write(
- Message* m,
- const param_type& p) {
- WriteParam(m, static_cast<int>(p.mode));
- WriteParam(m, p.title);
- WriteParam(m, p.default_file_name);
- WriteParam(m, p.accept_types);
-}
-
-bool ParamTraits<ViewHostMsg_RunFileChooser_Params>::Read(
- const Message* m,
- void** iter,
- param_type* p) {
- int mode;
- if (!ReadParam(m, iter, &mode))
- return false;
- if (mode != param_type::Open &&
- mode != param_type::OpenMultiple &&
- mode != param_type::OpenFolder &&
- mode != param_type::Save)
- return false;
- p->mode = static_cast<param_type::Mode>(mode);
- return
- ReadParam(m, iter, &p->title) &&
- ReadParam(m, iter, &p->default_file_name) &&
- ReadParam(m, iter, &p->accept_types);
-};
-
-void ParamTraits<ViewHostMsg_RunFileChooser_Params>::Log(
- const param_type& p,
- std::string* l) {
- switch (p.mode) {
- case param_type::Open:
- l->append("(Open, ");
- break;
- case param_type::OpenMultiple:
- l->append("(OpenMultiple, ");
- break;
- case param_type::OpenFolder:
- l->append("(OpenFolder, ");
- break;
- case param_type::Save:
- l->append("(Save, ");
- break;
- default:
- l->append("(UNKNOWN, ");
- }
- LogParam(p.title, l);
- l->append(", ");
- LogParam(p.default_file_name, l);
- l->append(", ");
- LogParam(p.accept_types, l);
-}
-
void ParamTraits<ViewMsg_ExtensionLoaded_Params>::Write(Message* m,
const param_type& p) {
WriteParam(m, p.location);
diff --git a/chrome/common/render_messages_params.h b/chrome/common/render_messages_params.h
index 4ce3b86..03d67a1 100644
--- a/chrome/common/render_messages_params.h
+++ b/chrome/common/render_messages_params.h
@@ -18,19 +18,16 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_extent.h"
#include "chrome/common/extensions/url_pattern.h"
-#include "chrome/common/window_container_type.h"
-#include "content/common/navigation_gesture.h"
#include "content/common/navigation_types.h"
#include "content/common/page_transition_types.h"
#include "content/common/serialized_script_value.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_param_traits.h"
-#include "net/base/host_port_pair.h"
+#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "webkit/glue/password_form.h"
#include "webkit/glue/webaccessibility.h"
-#include "webkit/plugins/npapi/webplugin.h"
// TODO(erg): Split this file into $1_db_params.h, $1_audio_params.h,
// $1_print_params.h and $1_render_params.h.
@@ -124,158 +121,6 @@ struct ViewHostMsg_GetSearchProviderInstallState_Params {
}
};
-// Parameters structure for ViewHostMsg_FrameNavigate, which has too many data
-// parameters to be reasonably put in a predefined IPC message.
-struct ViewHostMsg_FrameNavigate_Params {
- ViewHostMsg_FrameNavigate_Params();
- ~ViewHostMsg_FrameNavigate_Params();
-
- // Page ID of this navigation. The renderer creates a new unique page ID
- // anytime a new session history entry is created. This means you'll get new
- // page IDs for user actions, and the old page IDs will be reloaded when
- // iframes are loaded automatically.
- int32 page_id;
-
- // The frame ID for this navigation. The frame ID uniquely identifies the
- // frame the navigation happened in for a given renderer.
- int64 frame_id;
-
- // URL of the page being loaded.
- GURL url;
-
- // URL of the referrer of this load. WebKit generates this based on the
- // source of the event that caused the load.
- GURL referrer;
-
- // The type of transition.
- PageTransition::Type transition;
-
- // Lists the redirects that occurred on the way to the current page. This
- // vector has the same format as reported by the WebDataSource in the glue,
- // with the current page being the last one in the list (so even when
- // there's no redirect, there will be one entry in the list.
- std::vector<GURL> redirects;
-
- // Set to false if we want to update the session history but not update
- // the browser history. E.g., on unreachable urls.
- bool should_update_history;
-
- // See SearchableFormData for a description of these.
- GURL searchable_form_url;
- std::string searchable_form_encoding;
-
- // See password_form.h.
- webkit_glue::PasswordForm password_form;
-
- // Information regarding the security of the connection (empty if the
- // connection was not secure).
- std::string security_info;
-
- // The gesture that initiated this navigation.
- NavigationGesture gesture;
-
- // Contents MIME type of main frame.
- std::string contents_mime_type;
-
- // True if this was a post request.
- bool is_post;
-
- // Whether the frame navigation resulted in no change to the documents within
- // the page. For example, the navigation may have just resulted in scrolling
- // to a named anchor.
- bool was_within_same_page;
-
- // The status code of the HTTP request.
- int http_status_code;
-
- // Remote address of the socket which fetched this resource.
- net::HostPortPair socket_address;
-
- // True if the connection was proxied. In this case, socket_address
- // will represent the address of the proxy, rather than the remote host.
- bool was_fetched_via_proxy;
-
- // Serialized history item state to store in the navigation entry.
- std::string content_state;
-};
-
-// Values that may be OR'd together to form the 'flags' parameter of a
-// ViewHostMsg_UpdateRect_Params structure.
-struct ViewHostMsg_UpdateRect_Flags {
- enum {
- IS_RESIZE_ACK = 1 << 0,
- IS_RESTORE_ACK = 1 << 1,
- IS_REPAINT_ACK = 1 << 2,
- };
- static bool is_resize_ack(int flags) {
- return (flags & IS_RESIZE_ACK) != 0;
- }
- static bool is_restore_ack(int flags) {
- return (flags & IS_RESTORE_ACK) != 0;
- }
- static bool is_repaint_ack(int flags) {
- return (flags & IS_REPAINT_ACK) != 0;
- }
-};
-
-struct ViewHostMsg_UpdateRect_Params {
- ViewHostMsg_UpdateRect_Params();
- ~ViewHostMsg_UpdateRect_Params();
-
- // The bitmap to be painted into the view at the locations specified by
- // update_rects.
- TransportDIB::Id bitmap;
-
- // The position and size of the bitmap.
- gfx::Rect bitmap_rect;
-
- // The scroll offset. Only one of these can be non-zero, and if they are
- // both zero, then it means there is no scrolling and the scroll_rect is
- // ignored.
- int dx;
- int dy;
-
- // The rectangular region to scroll.
- gfx::Rect scroll_rect;
-
- // The scroll offset of the render view.
- gfx::Point scroll_offset;
-
- // The regions of the bitmap (in view coords) that contain updated pixels.
- // In the case of scrolling, this includes the scroll damage rect.
- std::vector<gfx::Rect> copy_rects;
-
- // The size of the RenderView when this message was generated. This is
- // included so the host knows how large the view is from the perspective of
- // the renderer process. This is necessary in case a resize operation is in
- // progress.
- gfx::Size view_size;
-
- // The area of the RenderView reserved for resize corner when this message
- // was generated. Reported for the same reason as view_size is.
- gfx::Rect resizer_rect;
-
- // New window locations for plugin child windows.
- std::vector<webkit::npapi::WebPluginGeometry> plugin_window_moves;
-
- // The following describes the various bits that may be set in flags:
- //
- // ViewHostMsg_UpdateRect_Flags::IS_RESIZE_ACK
- // Indicates that this is a response to a ViewMsg_Resize message.
- //
- // ViewHostMsg_UpdateRect_Flags::IS_RESTORE_ACK
- // Indicates that this is a response to a ViewMsg_WasRestored message.
- //
- // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
- // Indicates that this is a response to a ViewMsg_Repaint message.
- //
- // If flags is zero, then this message corresponds to an unsoliticed paint
- // request by the render view. Any of the above bits may be set in flags,
- // which would indicate that this paint message is an ACK for multiple
- // request messages.
- int flags;
-};
-
// Parameters for a render request.
struct ViewMsg_Print_Params {
ViewMsg_Print_Params();
@@ -434,73 +279,6 @@ struct ViewMsg_ExecuteCode_Params {
bool all_frames;
};
-struct ViewHostMsg_CreateWindow_Params {
- ViewHostMsg_CreateWindow_Params();
- ~ViewHostMsg_CreateWindow_Params();
-
- // Routing ID of the view initiating the open.
- int opener_id;
-
- // True if this open request came in the context of a user gesture.
- bool user_gesture;
-
- // Type of window requested.
- WindowContainerType window_container_type;
-
- // The session storage namespace ID this view should use.
- int64 session_storage_namespace_id;
-
- // The name of the resulting frame that should be created (empty if none
- // has been specified).
- string16 frame_name;
-
- // The frame identifier of the frame initiating the open.
- int64 opener_frame_id;
-
- // The URL of the frame initiating the open.
- GURL opener_url;
-
- // The security origin of the frame initiating the open.
- std::string opener_security_origin;
-
- // The URL that will be loaded in the new window (empty if none has been
- // sepcified).
- GURL target_url;
-};
-
-struct ViewHostMsg_RunFileChooser_Params {
- enum Mode {
- // Requires that the file exists before allowing the user to pick it.
- Open,
-
- // Like Open, but allows picking multiple files to open.
- OpenMultiple,
-
- // Like Open, but selects a folder.
- OpenFolder,
-
- // Allows picking a nonexistent file, and prompts to overwrite if the file
- // already exists.
- Save,
- };
-
- ViewHostMsg_RunFileChooser_Params();
- ~ViewHostMsg_RunFileChooser_Params();
-
- Mode mode;
-
- // Title to be used for the dialog. This may be empty for the default title,
- // which will be either "Open" or "Save" depending on the mode.
- string16 title;
-
- // Default file name to select in the dialog.
- FilePath default_file_name;
-
- // A comma-separated MIME types such as "audio/*,text/plain", that is used
- // to restrict selectable files to such types.
- string16 accept_types;
-};
-
struct ViewMsg_ExtensionLoaded_Params {
ViewMsg_ExtensionLoaded_Params();
~ViewMsg_ExtensionLoaded_Params();
@@ -631,22 +409,6 @@ struct ParamTraits<ViewHostMsg_GetSearchProviderInstallState_Params> {
};
template <>
-struct ParamTraits<ViewHostMsg_FrameNavigate_Params> {
- typedef ViewHostMsg_FrameNavigate_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<ViewHostMsg_UpdateRect_Params> {
- typedef ViewHostMsg_UpdateRect_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<ViewMsg_Print_Params> {
typedef ViewMsg_Print_Params param_type;
static void Write(Message* m, const param_type& p);
@@ -702,22 +464,6 @@ struct ParamTraits<ViewMsg_ExecuteCode_Params> {
static void Log(const param_type& p, std::string* l);
};
-template<>
-struct ParamTraits<ViewHostMsg_CreateWindow_Params> {
- typedef ViewHostMsg_CreateWindow_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<ViewHostMsg_RunFileChooser_Params> {
- typedef ViewHostMsg_RunFileChooser_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<ViewMsg_ExtensionLoaded_Params> {
typedef ViewMsg_ExtensionLoaded_Params param_type;
diff --git a/chrome/common/webkit_param_traits.cc b/chrome/common/webkit_param_traits.cc
index 5c9bd48..d43ade2 100644
--- a/chrome/common/webkit_param_traits.cc
+++ b/chrome/common/webkit_param_traits.cc
@@ -5,72 +5,9 @@
#include "chrome/common/webkit_param_traits.h"
#include "base/format_macros.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
namespace IPC {
-void ParamTraits<WebKit::WebRect>::Write(Message* m, const param_type& p) {
- WriteParam(m, p.x);
- WriteParam(m, p.y);
- WriteParam(m, p.width);
- WriteParam(m, p.height);
- }
-
-bool ParamTraits<WebKit::WebRect>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->x) &&
- ReadParam(m, iter, &p->y) &&
- ReadParam(m, iter, &p->width) &&
- ReadParam(m, iter, &p->height);
-}
-
-void ParamTraits<WebKit::WebRect>::Log(const param_type& p, std::string* l) {
- l->append("(");
- LogParam(p.x, l);
- l->append(", ");
- LogParam(p.y, l);
- l->append(", ");
- LogParam(p.width, l);
- l->append(", ");
- LogParam(p.height, l);
- l->append(")");
-}
-
-void ParamTraits<WebKit::WebScreenInfo>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.depth);
- WriteParam(m, p.depthPerComponent);
- WriteParam(m, p.isMonochrome);
- WriteParam(m, p.rect);
- WriteParam(m, p.availableRect);
-}
-
-bool ParamTraits<WebKit::WebScreenInfo>::Read(const Message* m, void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->depth) &&
- ReadParam(m, iter, &p->depthPerComponent) &&
- ReadParam(m, iter, &p->isMonochrome) &&
- ReadParam(m, iter, &p->rect) &&
- ReadParam(m, iter, &p->availableRect);
-}
-
-void ParamTraits<WebKit::WebScreenInfo>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.depth, l);
- l->append(", ");
- LogParam(p.depthPerComponent, l);
- l->append(", ");
- LogParam(p.isMonochrome, l);
- l->append(", ");
- LogParam(p.rect, l);
- l->append(", ");
- LogParam(p.availableRect, l);
- l->append(")");
-}
-
void ParamTraits<WebKit::WebCache::ResourceTypeStat>::Log(
const param_type& p, std::string* l) {
l->append(base::StringPrintf("%" PRIuS " %" PRIuS " %" PRIuS " %" PRIuS,
diff --git a/chrome/common/webkit_param_traits.h b/chrome/common/webkit_param_traits.h
index 9e7aa48..e640f79 100644
--- a/chrome/common/webkit_param_traits.h
+++ b/chrome/common/webkit_param_traits.h
@@ -29,44 +29,21 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.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/WebTextInputType.h"
namespace WebKit {
struct WebRect;
-struct WebScreenInfo;
}
namespace IPC {
template <>
-struct ParamTraits<WebKit::WebRect> {
- typedef WebKit::WebRect 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<WebKit::WebScreenInfo> {
- typedef WebKit::WebScreenInfo 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 SimilarTypeTraits<WebKit::WebConsoleMessage::Level> {
typedef int Type;
};
template <>
-struct SimilarTypeTraits<WebKit::WebPopupType> {
- typedef int Type;
-};
-
-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/common/window_container_type.cc b/chrome/common/window_container_type.cc
deleted file mode 100644
index 519fea3..0000000
--- a/chrome/common/window_container_type.cc
+++ /dev/null
@@ -1,41 +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 "chrome/common/window_container_type.h"
-
-#include "base/string_util.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h"
-
-namespace {
-
-const char kBackground[] = "background";
-const char kPersistent[] = "persistent";
-
-}
-
-WindowContainerType WindowFeaturesToContainerType(
- const WebKit::WebWindowFeatures& window_features) {
- bool background = false;
- bool persistent = false;
-
- for (size_t i = 0; i < window_features.additionalFeatures.size(); ++i) {
- if (LowerCaseEqualsASCII(window_features.additionalFeatures[i],
- kBackground))
- background = true;
- else if (LowerCaseEqualsASCII(window_features.additionalFeatures[i],
- kPersistent))
- persistent = true;
- }
-
- if (background) {
- if (persistent)
- return WINDOW_CONTAINER_TYPE_PERSISTENT;
- else
- return WINDOW_CONTAINER_TYPE_BACKGROUND;
- } else {
- return WINDOW_CONTAINER_TYPE_NORMAL;
- }
-}
diff --git a/chrome/common/window_container_type.h b/chrome/common/window_container_type.h
deleted file mode 100644
index 5db1d0e..0000000
--- a/chrome/common/window_container_type.h
+++ /dev/null
@@ -1,36 +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.
-
-#ifndef CHROME_COMMON_WINDOW_CONTAINER_TYPE_H_
-#define CHROME_COMMON_WINDOW_CONTAINER_TYPE_H_
-#pragma once
-
-namespace WebKit {
-
-struct WebWindowFeatures;
-
-}
-
-// "Container" types which can be requested via the window.open feature
-// string.
-enum WindowContainerType {
- // A window shown in popup or tab.
- WINDOW_CONTAINER_TYPE_NORMAL = 0,
-
- // A window run as a hidden "background" page.
- WINDOW_CONTAINER_TYPE_BACKGROUND,
-
- // A window run as a hidden "background" page that wishes to be started
- // upon browser launch and run beyond the lifetime of the pages that
- // reference it.
- WINDOW_CONTAINER_TYPE_PERSISTENT,
-
- WINDOW_CONTAINER_TYPE_MAX_VALUE
-};
-
-// Conversion function:
-WindowContainerType WindowFeaturesToContainerType(
- const WebKit::WebWindowFeatures& window_features);
-
-#endif // CHROME_COMMON_WINDOW_CONTAINER_TYPE_H_