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

Unified Diff: chrome/common/render_messages.h

Issue 2858049: Chromium plumbing for Device Orientation. (Closed)
Patch Set: Fixes after try bot runs 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/render_messages.h
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 02790e5b0865596868e92b0db667d21e76fdb5c7..d0881252feeae85dd151006e4584c031cc2a7712 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -813,6 +813,16 @@ struct ViewMsg_ExtensionExtentsUpdated_Params {
std::vector<ViewMsg_ExtensionExtentInfo> extension_apps;
};
+struct ViewMsg_DeviceOrientationUpdated_Params {
+ // These fields have the same meaning as in device_orientation::Orientation.
+ bool can_provide_alpha;
+ double alpha;
+ bool can_provide_beta;
+ double beta;
+ bool can_provide_gamma;
+ double gamma;
+};
+
// Values that may be OR'd together to form the 'flags' parameter of the
// ViewMsg_EnablePreferredSizeChangedMode message.
enum ViewHostMsg_EnablePreferredSizeChangedMode_Flags {
@@ -3309,6 +3319,44 @@ struct ParamTraits<webkit_glue::WebAccessibility> {
}
};
+// Traits for ViewMsg_DeviceOrientationUpdated_Params
+// structure to pack/unpack.
+template <>
+struct ParamTraits<ViewMsg_DeviceOrientationUpdated_Params> {
+ typedef ViewMsg_DeviceOrientationUpdated_Params param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.can_provide_alpha);
+ WriteParam(m, p.alpha);
+ WriteParam(m, p.can_provide_beta);
+ WriteParam(m, p.beta);
+ WriteParam(m, p.can_provide_gamma);
+ WriteParam(m, p.gamma);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->can_provide_alpha) &&
+ ReadParam(m, iter, &p->alpha) &&
+ ReadParam(m, iter, &p->can_provide_beta) &&
+ ReadParam(m, iter, &p->beta) &&
+ ReadParam(m, iter, &p->can_provide_gamma) &&
+ ReadParam(m, iter, &p->gamma);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.can_provide_alpha, l);
+ l->append(L", ");
+ LogParam(p.alpha, l);
+ l->append(L", ");
+ LogParam(p.can_provide_beta, l);
+ l->append(L", ");
+ LogParam(p.beta, l);
+ l->append(L", ");
+ LogParam(p.can_provide_gamma, l);
+ l->append(L", ");
+ LogParam(p.gamma, l);
+ l->append(L")");
+ }
+};
} // namespace IPC
#define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h"
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698