summaryrefslogtreecommitdiffstats
path: root/chrome/common/render_messages.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 03:26:29 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-05 03:26:29 +0000
commite09ba55021ea324864cff41148a0d3ee65539963 (patch)
tree1d9fb31246f6029e3ab9fe56b334c01634ca7436 /chrome/common/render_messages.h
parenta9358722ff8a3955c5b4a7430fc16af314653d50 (diff)
downloadchromium_src-e09ba55021ea324864cff41148a0d3ee65539963.zip
chromium_src-e09ba55021ea324864cff41148a0d3ee65539963.tar.gz
chromium_src-e09ba55021ea324864cff41148a0d3ee65539963.tar.bz2
Finish taking out render_messages.h includes from headers.
Review URL: http://codereview.chromium.org/20072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9209 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages.h')
-rw-r--r--chrome/common/render_messages.h159
1 files changed, 16 insertions, 143 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index c1f056a..b2ef967 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -13,6 +13,8 @@
#include "base/gfx/native_widget_types.h"
#include "base/ref_counted.h"
#include "base/shared_memory.h"
+#include "chrome/browser/renderer_host/resource_handler.h"
+#include "chrome/common/accessibility.h"
#include "chrome/common/bitmap_wire_data.h"
#include "chrome/common/filter_policy.h"
#include "chrome/common/ipc_message_utils.h"
@@ -23,7 +25,7 @@
#include "net/url_request/url_request_status.h"
#include "webkit/glue/autofill_form.h"
#include "webkit/glue/cache_manager.h"
-#include "webkit/glue/context_node_types.h"
+#include "webkit/glue/context_menu.h"
#include "webkit/glue/form_data.h"
#include "webkit/glue/password_form.h"
#include "webkit/glue/password_form_dom_manager.h"
@@ -121,61 +123,6 @@ struct ViewHostMsg_FrameNavigate_Params {
bool is_content_filtered;
};
-// Parameters structure for ViewHostMsg_ContextMenu, which has too many data
-// parameters to be reasonably put in a predefined IPC message.
-// FIXME(beng): This would be more useful in the future and more efficient
-// if the parameters here weren't so literally mapped to what
-// they contain for the ContextMenu task. It might be better
-// to make the string fields more generic so that this object
-// could be used for more contextual actions.
-struct ViewHostMsg_ContextMenu_Params {
- // This is the type of Context Node that the context menu was invoked on.
- ContextNode node;
-
- // These values represent the coordinates of the mouse when the context menu
- // was invoked. Coords are relative to the associated RenderView's origin.
- int x;
- int y;
-
- // This is the URL of the link that encloses the node the context menu was
- // invoked on.
- GURL link_url;
-
- // This is the URL of the image the context menu was invoked on.
- GURL image_url;
-
- // This is the URL of the top level page that the context menu was invoked
- // on.
- GURL page_url;
-
- // This is the URL of the subframe that the context menu was invoked on.
- GURL frame_url;
-
- // This is the text of the selection that the context menu was invoked on.
- std::wstring selection_text;
-
- // The misspelled word under the cursor, if any. Used to generate the
- // |dictionary_suggestions| list.
- std::wstring misspelled_word;
-
- // Suggested replacements for a misspelled word under the cursor.
- // This vector gets populated in the render process host
- // by intercepting ViewHostMsg_ContextMenu in ResourceMessageFilter
- // and populating dictionary_suggestions if the type is EDITABLE
- // and the misspelled_word is not empty.
- std::vector<std::wstring> dictionary_suggestions;
-
- // If editable, flag for whether spell check is enabled or not.
- bool spellcheck_enabled;
-
- // These flags indicate to the browser whether the renderer believes it is
- // able to perform the corresponding action.
- int edit_flags;
-
- // The security info for the resource we are showing the menu on.
- std::string security_info;
-};
-
// Values that may be OR'd together to form the 'flags' parameter of a
// ViewHostMsg_PaintRect message.
struct ViewHostMsg_PaintRect_Flags {
@@ -302,26 +249,6 @@ struct ViewHostMsg_Resource_Request {
std::vector<net::UploadData::Element> upload_content;
};
-// Parameters for a resource response header.
-struct ViewMsg_Resource_ResponseHead
- : webkit_glue::ResourceLoaderBridge::ResponseInfo {
- // The response status.
- URLRequestStatus status;
-
- // Specifies if the resource should be filtered before being displayed
- // (insecure resources can be filtered to keep the page secure).
- FilterPolicy::Type filter_policy;
-};
-
-// Parameters for a synchronous resource response.
-struct ViewHostMsg_SyncLoad_Result : ViewMsg_Resource_ResponseHead {
- // The final URL after any redirects.
- GURL final_url;
-
- // The response data.
- std::string data;
-};
-
// Parameters for a render request.
struct ViewMsg_Print_Params {
// In pixels according to dpi_x and dpi_y.
@@ -390,55 +317,6 @@ struct ViewHostMsg_DidPrintPage_Params {
double actual_shrink;
};
-// Parameters structure to hold a union of the possible IAccessible function
-// INPUT variables, with the unused fields always set to default value. Used in
-// ViewMsg_GetAccessibilityInfo, as only parameter.
-struct ViewMsg_Accessibility_In_Params {
- // Identifier to uniquely distinguish which instance of IAccessible is being
- // called upon on the renderer side.
- int iaccessible_id;
-
- // Identifier to resolve which IAccessible interface function is being called.
- int iaccessible_function_id;
-
- // Function input parameters.
- // Input VARIANT structure's LONG field to specify requested object.
- long input_variant_lval;
-
- // LONG input parameters, used differently depending on the function called.
- long input_long1;
- long input_long2;
-};
-
-// Parameters structure to hold a union of the possible IAccessible function
-// OUTPUT variables, with the unused fields always set to default value. Used in
-// ViewHostMsg_GetAccessibilityInfoResponse, as only parameter.
-struct ViewHostMsg_Accessibility_Out_Params {
- // Identifier to uniquely distinguish which instance of IAccessible is being
- // called upon on the renderer side.
- int iaccessible_id;
-
- // Function output parameters.
- // Output VARIANT structure's LONG field to specify requested object.
- long output_variant_lval;
-
- // LONG output parameters, used differently depending on the function called.
- // output_long1 can in some cases be set to -1 to indicate that the child
- // object found by the called IAccessible function is not a simple object.
- long output_long1;
- long output_long2;
- long output_long3;
- long output_long4;
-
- // String output parameter.
- std::wstring output_string;
-
- // Return code, either S_OK (true) or S_FALSE (false). WebKit MSAA error
- // return codes (E_POINTER, E_INVALIDARG, E_FAIL, E_NOTIMPL) must be handled
- // on the browser side by input validation.
- bool return_code;
-};
-
// The first parameter for the ViewHostMsg_ImeUpdateStatus message.
enum ViewHostMsg_ImeControl {
IME_DISABLE = 0,
@@ -610,10 +488,9 @@ struct ParamTraits<WebInputEvent::Type> {
}
};
-// Traits for ViewMsg_Accessibility_In_Params structure to pack/unpack.
template <>
-struct ParamTraits<ViewMsg_Accessibility_In_Params> {
- typedef ViewMsg_Accessibility_In_Params param_type;
+struct ParamTraits<AccessibilityInParams> {
+ typedef AccessibilityInParams param_type;
static void Write(Message* m, const param_type& p) {
WriteParam(m, p.iaccessible_id);
WriteParam(m, p.iaccessible_function_id);
@@ -644,10 +521,9 @@ struct ParamTraits<ViewMsg_Accessibility_In_Params> {
}
};
-// Traits for ViewHostMsg_Accessibility_Out_Params structure to pack/unpack.
template <>
-struct ParamTraits<ViewHostMsg_Accessibility_Out_Params> {
- typedef ViewHostMsg_Accessibility_Out_Params param_type;
+struct ParamTraits<AccessibilityOutParams> {
+ typedef AccessibilityOutParams param_type;
static void Write(Message* m, const param_type& p) {
WriteParam(m, p.iaccessible_id);
WriteParam(m, p.output_variant_lval);
@@ -905,10 +781,9 @@ struct ParamTraits<ViewHostMsg_FrameNavigate_Params> {
}
};
-// Traits for ViewHostMsg_ContextMenu_Params structure to pack/unpack.
template <>
-struct ParamTraits<ViewHostMsg_ContextMenu_Params> {
- typedef ViewHostMsg_ContextMenu_Params param_type;
+struct ParamTraits<ContextMenuParams> {
+ typedef ContextMenuParams param_type;
static void Write(Message* m, const param_type& p) {
WriteParam(m, p.node);
WriteParam(m, p.x);
@@ -941,7 +816,7 @@ struct ParamTraits<ViewHostMsg_ContextMenu_Params> {
ReadParam(m, iter, &p->security_info);
}
static void Log(const param_type& p, std::wstring* l) {
- l->append(L"<ViewHostMsg_ContextMenu_Params>");
+ l->append(L"<ContextMenuParams>");
}
};
@@ -1423,10 +1298,9 @@ struct ParamTraits<webkit_glue::ResourceLoaderBridge::ResponseInfo> {
}
};
-// Traits for ViewMsg_Resource_ResponseHead
template <>
-struct ParamTraits<ViewMsg_Resource_ResponseHead> {
- typedef ViewMsg_Resource_ResponseHead param_type;
+struct ParamTraits<ResourceResponseHead> {
+ typedef ResourceResponseHead param_type;
static void Write(Message* m, const param_type& p) {
ParamTraits<webkit_glue::ResourceLoaderBridge::ResponseInfo>::Write(m, p);
WriteParam(m, p.status);
@@ -1444,18 +1318,17 @@ struct ParamTraits<ViewMsg_Resource_ResponseHead> {
}
};
-// Traits for ViewHostMsg_Resource_SyncLoad_Response
template <>
-struct ParamTraits<ViewHostMsg_SyncLoad_Result> {
- typedef ViewHostMsg_SyncLoad_Result param_type;
+struct ParamTraits<SyncLoadResult> {
+ typedef SyncLoadResult param_type;
static void Write(Message* m, const param_type& p) {
- ParamTraits<ViewMsg_Resource_ResponseHead>::Write(m, p);
+ ParamTraits<ResourceResponseHead>::Write(m, p);
WriteParam(m, p.final_url);
WriteParam(m, p.data);
}
static bool Read(const Message* m, void** iter, param_type* r) {
return
- ParamTraits<ViewMsg_Resource_ResponseHead>::Read(m, iter, r) &&
+ ParamTraits<ResourceResponseHead>::Read(m, iter, r) &&
ReadParam(m, iter, &r->final_url) &&
ReadParam(m, iter, &r->data);
}