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

Unified Diff: third_party/WebKit/public/web/WindowFeaturesStructTraits.h

Issue 2363573002: Move ViewHostMsg_CreateWindow to mojom (Closed)
Patch Set: . Created 4 years, 3 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 | « third_party/WebKit/public/web/OWNERS ('k') | third_party/WebKit/public/web/WindowFeaturesStructTraits.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/web/WindowFeaturesStructTraits.h
diff --git a/third_party/WebKit/public/web/WindowFeaturesStructTraits.h b/third_party/WebKit/public/web/WindowFeaturesStructTraits.h
new file mode 100644
index 0000000000000000000000000000000000000000..e327adc8b4ea72b38cb1ee3e2c0bfd34ee1b7788
--- /dev/null
+++ b/third_party/WebKit/public/web/WindowFeaturesStructTraits.h
@@ -0,0 +1,40 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef WindowFeaturesStructTraits_h
+#define WindowFeaturesStructTraits_h
+
+#include "WebWindowFeatures.h"
+#include "mojo/public/cpp/bindings/struct_traits.h"
+#include "third_party/WebKit/public/web/window_features.mojom-shared.h"
+
+namespace mojo {
+
+template <>
+struct StructTraits<::blink::mojom::WindowFeaturesDataView, ::blink::WebWindowFeatures> {
+ static float x(const ::blink::WebWindowFeatures& features) { return features.x; }
+ static bool has_x(const ::blink::WebWindowFeatures& features) { return features.xSet; }
+ static float y(const ::blink::WebWindowFeatures& features) { return features.y; }
+ static bool has_y(const ::blink::WebWindowFeatures& features) { return features.ySet; }
+ static float width(const ::blink::WebWindowFeatures& features) { return features.width; }
+ static bool has_width(const ::blink::WebWindowFeatures& features) { return features.widthSet; }
+ static float height(const ::blink::WebWindowFeatures& features) { return features.height; }
+ static bool has_height(const ::blink::WebWindowFeatures& features) { return features.heightSet; }
+
+ static bool menu_bar_visible(const ::blink::WebWindowFeatures& features) { return features.menuBarVisible; }
+ static bool status_bar_visible(const ::blink::WebWindowFeatures& features) { return features.statusBarVisible; }
+ static bool tool_bar_visible(const ::blink::WebWindowFeatures& features) { return features.toolBarVisible; }
+ static bool location_bar_visible(const ::blink::WebWindowFeatures& features) { return features.locationBarVisible; }
+ static bool scrollbars_visible(const ::blink::WebWindowFeatures& features) { return features.scrollbarsVisible; }
+ static bool resizable(const ::blink::WebWindowFeatures& features) { return features.resizable; }
+
+ static bool fullscreen(const ::blink::WebWindowFeatures& features) { return features.fullscreen; }
+ static bool dialog(const ::blink::WebWindowFeatures& features) { return features.dialog; }
+
+ static bool Read(::blink::mojom::WindowFeaturesDataView, ::blink::WebWindowFeatures* out);
+};
+
+} // namespace mojo
+
+#endif
« no previous file with comments | « third_party/WebKit/public/web/OWNERS ('k') | third_party/WebKit/public/web/WindowFeaturesStructTraits.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698