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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 std::string extension_id; | 806 std::string extension_id; |
807 ExtensionExtent web_extent; | 807 ExtensionExtent web_extent; |
808 ExtensionExtent browse_extent; | 808 ExtensionExtent browse_extent; |
809 }; | 809 }; |
810 | 810 |
811 struct ViewMsg_ExtensionExtentsUpdated_Params { | 811 struct ViewMsg_ExtensionExtentsUpdated_Params { |
812 // Describes the installed extension apps and the URLs they cover. | 812 // Describes the installed extension apps and the URLs they cover. |
813 std::vector<ViewMsg_ExtensionExtentInfo> extension_apps; | 813 std::vector<ViewMsg_ExtensionExtentInfo> extension_apps; |
814 }; | 814 }; |
815 | 815 |
| 816 struct ViewMsg_DeviceOrientationUpdated_Params { |
| 817 // These fields have the same meaning as in device_orientation::Orientation. |
| 818 bool can_provide_alpha; |
| 819 double alpha; |
| 820 bool can_provide_beta; |
| 821 double beta; |
| 822 bool can_provide_gamma; |
| 823 double gamma; |
| 824 }; |
| 825 |
816 // Values that may be OR'd together to form the 'flags' parameter of the | 826 // Values that may be OR'd together to form the 'flags' parameter of the |
817 // ViewMsg_EnablePreferredSizeChangedMode message. | 827 // ViewMsg_EnablePreferredSizeChangedMode message. |
818 enum ViewHostMsg_EnablePreferredSizeChangedMode_Flags { | 828 enum ViewHostMsg_EnablePreferredSizeChangedMode_Flags { |
819 kPreferredSizeNothing, | 829 kPreferredSizeNothing, |
820 kPreferredSizeWidth = 1 << 0, | 830 kPreferredSizeWidth = 1 << 0, |
821 // Requesting the height currently requires a polling loop in render_view.cc. | 831 // Requesting the height currently requires a polling loop in render_view.cc. |
822 kPreferredSizeHeightThisIsSlow = 1 << 1, | 832 kPreferredSizeHeightThisIsSlow = 1 << 1, |
823 }; | 833 }; |
824 | 834 |
825 namespace IPC { | 835 namespace IPC { |
(...skipping 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3302 l->append(L", "); | 3312 l->append(L", "); |
3303 LogParam(p.location, l); | 3313 LogParam(p.location, l); |
3304 l->append(L", "); | 3314 l->append(L", "); |
3305 LogParam(p.attributes, l); | 3315 LogParam(p.attributes, l); |
3306 l->append(L", "); | 3316 l->append(L", "); |
3307 LogParam(p.children, l); | 3317 LogParam(p.children, l); |
3308 l->append(L")"); | 3318 l->append(L")"); |
3309 } | 3319 } |
3310 }; | 3320 }; |
3311 | 3321 |
| 3322 // Traits for ViewMsg_DeviceOrientationUpdated_Params |
| 3323 // structure to pack/unpack. |
| 3324 template <> |
| 3325 struct ParamTraits<ViewMsg_DeviceOrientationUpdated_Params> { |
| 3326 typedef ViewMsg_DeviceOrientationUpdated_Params param_type; |
| 3327 static void Write(Message* m, const param_type& p) { |
| 3328 WriteParam(m, p.can_provide_alpha); |
| 3329 WriteParam(m, p.alpha); |
| 3330 WriteParam(m, p.can_provide_beta); |
| 3331 WriteParam(m, p.beta); |
| 3332 WriteParam(m, p.can_provide_gamma); |
| 3333 WriteParam(m, p.gamma); |
| 3334 } |
| 3335 static bool Read(const Message* m, void** iter, param_type* p) { |
| 3336 return |
| 3337 ReadParam(m, iter, &p->can_provide_alpha) && |
| 3338 ReadParam(m, iter, &p->alpha) && |
| 3339 ReadParam(m, iter, &p->can_provide_beta) && |
| 3340 ReadParam(m, iter, &p->beta) && |
| 3341 ReadParam(m, iter, &p->can_provide_gamma) && |
| 3342 ReadParam(m, iter, &p->gamma); |
| 3343 } |
| 3344 static void Log(const param_type& p, std::wstring* l) { |
| 3345 l->append(L"("); |
| 3346 LogParam(p.can_provide_alpha, l); |
| 3347 l->append(L", "); |
| 3348 LogParam(p.alpha, l); |
| 3349 l->append(L", "); |
| 3350 LogParam(p.can_provide_beta, l); |
| 3351 l->append(L", "); |
| 3352 LogParam(p.beta, l); |
| 3353 l->append(L", "); |
| 3354 LogParam(p.can_provide_gamma, l); |
| 3355 l->append(L", "); |
| 3356 LogParam(p.gamma, l); |
| 3357 l->append(L")"); |
| 3358 } |
| 3359 }; |
3312 } // namespace IPC | 3360 } // namespace IPC |
3313 | 3361 |
3314 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 3362 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
3315 #include "ipc/ipc_message_macros.h" | 3363 #include "ipc/ipc_message_macros.h" |
3316 | 3364 |
3317 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 3365 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
OLD | NEW |