| OLD | NEW |
| 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 Loading... |
| 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" | |
| 56 #include "webkit/glue/webcookie.h" | 55 #include "webkit/glue/webcookie.h" |
| 57 #include "webkit/glue/webdropdata.h" | 56 #include "webkit/glue/webdropdata.h" |
| 58 #include "webkit/glue/webmenuitem.h" | 57 #include "webkit/glue/webmenuitem.h" |
| 59 #include "webkit/glue/webpreferences.h" | 58 #include "webkit/glue/webpreferences.h" |
| 60 | 59 |
| 61 namespace base { | 60 namespace base { |
| 62 class Time; | 61 class Time; |
| 63 } | 62 } |
| 64 | 63 |
| 64 namespace webkit_glue { |
| 65 struct WebAccessibility; |
| 66 } |
| 67 |
| 65 class SkBitmap; | 68 class SkBitmap; |
| 66 | 69 |
| 67 // Parameters structure for ViewMsg_Navigate, which has too many data | 70 // Parameters structure for ViewMsg_Navigate, which has too many data |
| 68 // parameters to be reasonably put in a predefined IPC message. | 71 // parameters to be reasonably put in a predefined IPC message. |
| 69 struct ViewMsg_Navigate_Params { | 72 struct ViewMsg_Navigate_Params { |
| 70 enum NavigationType { | 73 enum NavigationType { |
| 71 // Reload the page. | 74 // Reload the page. |
| 72 RELOAD, | 75 RELOAD, |
| 73 | 76 |
| 74 // Reload the page, ignoring any cache entries. | 77 // Reload the page, ignoring any cache entries. |
| (...skipping 3176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3251 return true; | 3254 return true; |
| 3252 } | 3255 } |
| 3253 static void Log(const param_type& p, std::wstring* l) { | 3256 static void Log(const param_type& p, std::wstring* l) { |
| 3254 LogParam(p, l); | 3257 LogParam(p, l); |
| 3255 } | 3258 } |
| 3256 }; | 3259 }; |
| 3257 | 3260 |
| 3258 template <> | 3261 template <> |
| 3259 struct ParamTraits<webkit_glue::WebAccessibility> { | 3262 struct ParamTraits<webkit_glue::WebAccessibility> { |
| 3260 typedef webkit_glue::WebAccessibility param_type; | 3263 typedef webkit_glue::WebAccessibility param_type; |
| 3261 static void Write(Message* m, const param_type& p) { | 3264 static void Write(Message* m, const param_type& p); |
| 3262 WriteParam(m, p.id); | 3265 static bool Read(const Message* m, void** iter, param_type* p); |
| 3263 WriteParam(m, p.name); | 3266 static void Log(const param_type& p, std::wstring* l); |
| 3264 WriteParam(m, p.value); | |
| 3265 WriteParam(m, static_cast<int>(p.role)); | |
| 3266 WriteParam(m, static_cast<int>(p.state)); | |
| 3267 WriteParam(m, p.location); | |
| 3268 WriteParam(m, p.attributes); | |
| 3269 WriteParam(m, p.children); | |
| 3270 } | |
| 3271 static bool Read(const Message* m, void** iter, param_type* p) { | |
| 3272 bool ret = ReadParam(m, iter, &p->id); | |
| 3273 ret = ret && ReadParam(m, iter, &p->name); | |
| 3274 ret = ret && ReadParam(m, iter, &p->value); | |
| 3275 int role = -1; | |
| 3276 ret = ret && ReadParam(m, iter, &role); | |
| 3277 if (role >= webkit_glue::WebAccessibility::ROLE_NONE && | |
| 3278 role < webkit_glue::WebAccessibility::NUM_ROLES) { | |
| 3279 p->role = static_cast<webkit_glue::WebAccessibility::Role>(role); | |
| 3280 } else { | |
| 3281 p->role = webkit_glue::WebAccessibility::ROLE_NONE; | |
| 3282 } | |
| 3283 int state = 0; | |
| 3284 ret = ret && ReadParam(m, iter, &state); | |
| 3285 p->state = static_cast<webkit_glue::WebAccessibility::State>(state); | |
| 3286 ret = ret && ReadParam(m, iter, &p->location); | |
| 3287 ret = ret && ReadParam(m, iter, &p->attributes); | |
| 3288 ret = ret && ReadParam(m, iter, &p->children); | |
| 3289 return ret; | |
| 3290 } | |
| 3291 static void Log(const param_type& p, std::wstring* l) { | |
| 3292 l->append(L"("); | |
| 3293 LogParam(p.id, l); | |
| 3294 l->append(L", "); | |
| 3295 LogParam(p.name, l); | |
| 3296 l->append(L", "); | |
| 3297 LogParam(p.value, l); | |
| 3298 l->append(L", "); | |
| 3299 LogParam(static_cast<int>(p.role), l); | |
| 3300 l->append(L", "); | |
| 3301 LogParam(static_cast<int>(p.state), l); | |
| 3302 l->append(L", "); | |
| 3303 LogParam(p.location, l); | |
| 3304 l->append(L", "); | |
| 3305 LogParam(p.attributes, l); | |
| 3306 l->append(L", "); | |
| 3307 LogParam(p.children, l); | |
| 3308 l->append(L")"); | |
| 3309 } | |
| 3310 }; | 3267 }; |
| 3311 | 3268 |
| 3312 } // namespace IPC | 3269 } // namespace IPC |
| 3313 | 3270 |
| 3314 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 3271 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
| 3315 #include "ipc/ipc_message_macros.h" | 3272 #include "ipc/ipc_message_macros.h" |
| 3316 | 3273 |
| 3317 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 3274 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| OLD | NEW |