Chromium Code Reviews| 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 #include "content/common/frame_owner_properties.h" | |
| 6 | |
| 7 namespace content { | |
| 8 | |
| 9 FrameOwnerProperties::FrameOwnerProperties() {} | |
| 10 | |
| 11 FrameOwnerProperties::FrameOwnerProperties(const FrameOwnerProperties& other) | |
|
dcheng
2016/07/14 11:17:48
Nit: just default this:
FrameOwnerProperties::Fra
raymes
2016/07/18 03:39:28
whoa cool!
| |
| 12 : scrolling_mode(other.scrolling_mode), | |
| 13 margin_width(other.margin_width), | |
| 14 margin_height(other.margin_height), | |
| 15 allow_fullscreen(other.allow_fullscreen), | |
| 16 delegated_permissions(other.delegated_permissions) {} | |
| 17 | |
| 18 FrameOwnerProperties::FrameOwnerProperties( | |
| 19 const blink::WebFrameOwnerProperties& web_frame_owner_properties) | |
| 20 : scrolling_mode(web_frame_owner_properties.scrollingMode), | |
| 21 margin_width(web_frame_owner_properties.marginWidth), | |
| 22 margin_height(web_frame_owner_properties.marginHeight), | |
| 23 allow_fullscreen(web_frame_owner_properties.allowFullscreen), | |
| 24 delegated_permissions( | |
| 25 web_frame_owner_properties.delegatedPermissions.begin(), | |
| 26 web_frame_owner_properties.delegatedPermissions.end()) {} | |
| 27 | |
| 28 FrameOwnerProperties::~FrameOwnerProperties() {} | |
| 29 | |
| 30 blink::WebFrameOwnerProperties FrameOwnerProperties::ToWebFrameOwnerProperties() | |
| 31 const { | |
| 32 blink::WebFrameOwnerProperties result; | |
| 33 | |
| 34 result.scrollingMode = scrolling_mode; | |
| 35 result.marginWidth = margin_width; | |
| 36 result.marginHeight = margin_height; | |
| 37 result.allowFullscreen = allow_fullscreen; | |
| 38 result.delegatedPermissions = | |
| 39 blink::WebVector<blink::WebPermissionType>(delegated_permissions); | |
| 40 | |
| 41 return result; | |
| 42 } | |
| 43 | |
| 44 } // namespace content | |
| OLD | NEW |