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

Side by Side Diff: chrome/common/render_messages.h

Issue 3152007: Revert "FBTF: Allow forward declaration of classes passed to sync IPC messages." (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/render_messages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
6 #define CHROME_COMMON_RENDER_MESSAGES_H_ 6 #define CHROME_COMMON_RENDER_MESSAGES_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" 45 #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h"
46 #include "webkit/appcache/appcache_interfaces.h" 46 #include "webkit/appcache/appcache_interfaces.h"
47 #include "webkit/glue/context_menu.h" 47 #include "webkit/glue/context_menu.h"
48 #include "webkit/glue/form_data.h" 48 #include "webkit/glue/form_data.h"
49 #include "webkit/glue/form_field.h" 49 #include "webkit/glue/form_field.h"
50 #include "webkit/glue/password_form.h" 50 #include "webkit/glue/password_form.h"
51 #include "webkit/glue/password_form_dom_manager.h" 51 #include "webkit/glue/password_form_dom_manager.h"
52 #include "webkit/glue/plugins/webplugin.h" 52 #include "webkit/glue/plugins/webplugin.h"
53 #include "webkit/glue/plugins/webplugininfo.h" 53 #include "webkit/glue/plugins/webplugininfo.h"
54 #include "webkit/glue/resource_loader_bridge.h" 54 #include "webkit/glue/resource_loader_bridge.h"
55 #include "webkit/glue/webaccessibility.h"
55 #include "webkit/glue/webcookie.h" 56 #include "webkit/glue/webcookie.h"
56 #include "webkit/glue/webdropdata.h" 57 #include "webkit/glue/webdropdata.h"
57 #include "webkit/glue/webmenuitem.h" 58 #include "webkit/glue/webmenuitem.h"
58 #include "webkit/glue/webpreferences.h" 59 #include "webkit/glue/webpreferences.h"
59 60
60 namespace base { 61 namespace base {
61 class Time; 62 class Time;
62 } 63 }
63 64
64 namespace webkit_glue {
65 struct WebAccessibility;
66 }
67
68 class SkBitmap; 65 class SkBitmap;
69 66
70 // Parameters structure for ViewMsg_Navigate, which has too many data 67 // Parameters structure for ViewMsg_Navigate, which has too many data
71 // parameters to be reasonably put in a predefined IPC message. 68 // parameters to be reasonably put in a predefined IPC message.
72 struct ViewMsg_Navigate_Params { 69 struct ViewMsg_Navigate_Params {
73 enum NavigationType { 70 enum NavigationType {
74 // Reload the page. 71 // Reload the page.
75 RELOAD, 72 RELOAD,
76 73
77 // Reload the page, ignoring any cache entries. 74 // Reload the page, ignoring any cache entries.
(...skipping 3240 matching lines...) Expand 10 before | Expand all | Expand 10 after
3318 return true; 3315 return true;
3319 } 3316 }
3320 static void Log(const param_type& p, std::wstring* l) { 3317 static void Log(const param_type& p, std::wstring* l) {
3321 LogParam(p, l); 3318 LogParam(p, l);
3322 } 3319 }
3323 }; 3320 };
3324 3321
3325 template <> 3322 template <>
3326 struct ParamTraits<webkit_glue::WebAccessibility> { 3323 struct ParamTraits<webkit_glue::WebAccessibility> {
3327 typedef webkit_glue::WebAccessibility param_type; 3324 typedef webkit_glue::WebAccessibility param_type;
3328 static void Write(Message* m, const param_type& p); 3325 static void Write(Message* m, const param_type& p) {
3329 static bool Read(const Message* m, void** iter, param_type* p); 3326 WriteParam(m, p.id);
3330 static void Log(const param_type& p, std::wstring* l); 3327 WriteParam(m, p.name);
3328 WriteParam(m, p.value);
3329 WriteParam(m, static_cast<int>(p.role));
3330 WriteParam(m, static_cast<int>(p.state));
3331 WriteParam(m, p.location);
3332 WriteParam(m, p.attributes);
3333 WriteParam(m, p.children);
3334 }
3335 static bool Read(const Message* m, void** iter, param_type* p) {
3336 bool ret = ReadParam(m, iter, &p->id);
3337 ret = ret && ReadParam(m, iter, &p->name);
3338 ret = ret && ReadParam(m, iter, &p->value);
3339 int role = -1;
3340 ret = ret && ReadParam(m, iter, &role);
3341 if (role >= webkit_glue::WebAccessibility::ROLE_NONE &&
3342 role < webkit_glue::WebAccessibility::NUM_ROLES) {
3343 p->role = static_cast<webkit_glue::WebAccessibility::Role>(role);
3344 } else {
3345 p->role = webkit_glue::WebAccessibility::ROLE_NONE;
3346 }
3347 int state = 0;
3348 ret = ret && ReadParam(m, iter, &state);
3349 p->state = static_cast<webkit_glue::WebAccessibility::State>(state);
3350 ret = ret && ReadParam(m, iter, &p->location);
3351 ret = ret && ReadParam(m, iter, &p->attributes);
3352 ret = ret && ReadParam(m, iter, &p->children);
3353 return ret;
3354 }
3355 static void Log(const param_type& p, std::wstring* l) {
3356 l->append(L"(");
3357 LogParam(p.id, l);
3358 l->append(L", ");
3359 LogParam(p.name, l);
3360 l->append(L", ");
3361 LogParam(p.value, l);
3362 l->append(L", ");
3363 LogParam(static_cast<int>(p.role), l);
3364 l->append(L", ");
3365 LogParam(static_cast<int>(p.state), l);
3366 l->append(L", ");
3367 LogParam(p.location, l);
3368 l->append(L", ");
3369 LogParam(p.attributes, l);
3370 l->append(L", ");
3371 LogParam(p.children, l);
3372 l->append(L")");
3373 }
3331 }; 3374 };
3332 3375
3333 // Traits for ViewMsg_DeviceOrientationUpdated_Params 3376 // Traits for ViewMsg_DeviceOrientationUpdated_Params
3334 // structure to pack/unpack. 3377 // structure to pack/unpack.
3335 template <> 3378 template <>
3336 struct ParamTraits<ViewMsg_DeviceOrientationUpdated_Params> { 3379 struct ParamTraits<ViewMsg_DeviceOrientationUpdated_Params> {
3337 typedef ViewMsg_DeviceOrientationUpdated_Params param_type; 3380 typedef ViewMsg_DeviceOrientationUpdated_Params param_type;
3338 static void Write(Message* m, const param_type& p) { 3381 static void Write(Message* m, const param_type& p) {
3339 WriteParam(m, p.can_provide_alpha); 3382 WriteParam(m, p.can_provide_alpha);
3340 WriteParam(m, p.alpha); 3383 WriteParam(m, p.alpha);
(...skipping 26 matching lines...) Expand all
3367 LogParam(p.gamma, l); 3410 LogParam(p.gamma, l);
3368 l->append(L")"); 3411 l->append(L")");
3369 } 3412 }
3370 }; 3413 };
3371 } // namespace IPC 3414 } // namespace IPC
3372 3415
3373 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" 3416 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h"
3374 #include "ipc/ipc_message_macros.h" 3417 #include "ipc/ipc_message_macros.h"
3375 3418
3376 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 3419 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
OLDNEW
« no previous file with comments | « chrome/chrome_common.gypi ('k') | chrome/common/render_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698