OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WindowFeaturesStructTraits_h |
| 6 #define WindowFeaturesStructTraits_h |
| 7 |
| 8 #include "WebWindowFeatures.h" |
| 9 #include "mojo/public/cpp/bindings/struct_traits.h" |
| 10 #include "third_party/WebKit/public/web/window_features.mojom-shared.h" |
| 11 |
| 12 namespace mojo { |
| 13 |
| 14 template <> |
| 15 struct StructTraits<::blink::mojom::WindowFeaturesDataView, ::blink::WebWindowFe
atures> { |
| 16 static float x(const ::blink::WebWindowFeatures& features) { return features
.x; } |
| 17 static bool has_x(const ::blink::WebWindowFeatures& features) { return featu
res.xSet; } |
| 18 static float y(const ::blink::WebWindowFeatures& features) { return features
.y; } |
| 19 static bool has_y(const ::blink::WebWindowFeatures& features) { return featu
res.ySet; } |
| 20 static float width(const ::blink::WebWindowFeatures& features) { return feat
ures.width; } |
| 21 static bool has_width(const ::blink::WebWindowFeatures& features) { return f
eatures.widthSet; } |
| 22 static float height(const ::blink::WebWindowFeatures& features) { return fea
tures.height; } |
| 23 static bool has_height(const ::blink::WebWindowFeatures& features) { return
features.heightSet; } |
| 24 |
| 25 static bool menu_bar_visible(const ::blink::WebWindowFeatures& features) { r
eturn features.menuBarVisible; } |
| 26 static bool status_bar_visible(const ::blink::WebWindowFeatures& features) {
return features.statusBarVisible; } |
| 27 static bool tool_bar_visible(const ::blink::WebWindowFeatures& features) { r
eturn features.toolBarVisible; } |
| 28 static bool location_bar_visible(const ::blink::WebWindowFeatures& features)
{ return features.locationBarVisible; } |
| 29 static bool scrollbars_visible(const ::blink::WebWindowFeatures& features) {
return features.scrollbarsVisible; } |
| 30 static bool resizable(const ::blink::WebWindowFeatures& features) { return f
eatures.resizable; } |
| 31 |
| 32 static bool fullscreen(const ::blink::WebWindowFeatures& features) { return
features.fullscreen; } |
| 33 static bool dialog(const ::blink::WebWindowFeatures& features) { return feat
ures.dialog; } |
| 34 |
| 35 static bool Read(::blink::mojom::WindowFeaturesDataView, ::blink::WebWindowF
eatures* out); |
| 36 }; |
| 37 |
| 38 } // namespace mojo |
| 39 |
| 40 #endif |
OLD | NEW |