OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 WebFrameClient* client, | 159 WebFrameClient* client, |
160 WebWidgetClient* widget_client, | 160 WebWidgetClient* widget_client, |
161 WebFrame* previous_sibling, | 161 WebFrame* previous_sibling, |
162 const WebFrameOwnerProperties& properties) { | 162 const WebFrameOwnerProperties& properties) { |
163 if (!client) | 163 if (!client) |
164 client = DefaultWebFrameClient(); | 164 client = DefaultWebFrameClient(); |
165 | 165 |
166 WebLocalFrameImpl* frame = ToWebLocalFrameImpl(parent->CreateLocalChild( | 166 WebLocalFrameImpl* frame = ToWebLocalFrameImpl(parent->CreateLocalChild( |
167 WebTreeScopeType::kDocument, name, WebSandboxFlags::kNone, client, | 167 WebTreeScopeType::kDocument, name, WebSandboxFlags::kNone, client, |
168 static_cast<TestWebFrameClient*>(client)->GetInterfaceProvider(), nullptr, | 168 static_cast<TestWebFrameClient*>(client)->GetInterfaceProvider(), nullptr, |
169 previous_sibling, properties, nullptr)); | 169 previous_sibling, WebParsedFeaturePolicy(), properties, nullptr)); |
170 | 170 |
171 if (!widget_client) | 171 if (!widget_client) |
172 widget_client = DefaultWebWidgetClient(); | 172 widget_client = DefaultWebWidgetClient(); |
173 WebFrameWidget::Create(widget_client, frame); | 173 WebFrameWidget::Create(widget_client, frame); |
174 | 174 |
175 return frame; | 175 return frame; |
176 } | 176 } |
177 | 177 |
178 WebRemoteFrameImpl* CreateRemoteChild(WebRemoteFrame* parent, | 178 WebRemoteFrameImpl* CreateRemoteChild(WebRemoteFrame* parent, |
179 WebRemoteFrameClient* client, | 179 WebRemoteFrameClient* client, |
180 const WebString& name) { | 180 const WebString& name) { |
181 return ToWebRemoteFrameImpl( | 181 return ToWebRemoteFrameImpl(parent->CreateRemoteChild( |
182 parent->CreateRemoteChild(WebTreeScopeType::kDocument, name, | 182 WebTreeScopeType::kDocument, name, WebSandboxFlags::kNone, |
183 WebSandboxFlags::kNone, client, nullptr)); | 183 WebParsedFeaturePolicy(), client, nullptr)); |
184 } | 184 } |
185 | 185 |
186 WebViewHelper::WebViewHelper(SettingOverrider* setting_overrider) | 186 WebViewHelper::WebViewHelper(SettingOverrider* setting_overrider) |
187 : web_view_(nullptr), setting_overrider_(setting_overrider) {} | 187 : web_view_(nullptr), setting_overrider_(setting_overrider) {} |
188 | 188 |
189 WebViewHelper::~WebViewHelper() { | 189 WebViewHelper::~WebViewHelper() { |
190 Reset(); | 190 Reset(); |
191 } | 191 } |
192 | 192 |
193 WebViewImpl* WebViewHelper::InitializeWithOpener( | 193 WebViewImpl* WebViewHelper::InitializeWithOpener( |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 299 |
300 frame->Close(); | 300 frame->Close(); |
301 } | 301 } |
302 | 302 |
303 WebLocalFrame* TestWebFrameClient::CreateChildFrame( | 303 WebLocalFrame* TestWebFrameClient::CreateChildFrame( |
304 WebLocalFrame* parent, | 304 WebLocalFrame* parent, |
305 WebTreeScopeType scope, | 305 WebTreeScopeType scope, |
306 const WebString& name, | 306 const WebString& name, |
307 const WebString& fallback_name, | 307 const WebString& fallback_name, |
308 WebSandboxFlags sandbox_flags, | 308 WebSandboxFlags sandbox_flags, |
| 309 const WebParsedFeaturePolicy& container_policy, |
309 const WebFrameOwnerProperties& frame_owner_properties) { | 310 const WebFrameOwnerProperties& frame_owner_properties) { |
310 WebLocalFrame* frame = | 311 WebLocalFrame* frame = |
311 WebLocalFrame::Create(scope, this, GetInterfaceProvider(), nullptr); | 312 WebLocalFrame::Create(scope, this, GetInterfaceProvider(), nullptr); |
312 parent->AppendChild(frame); | 313 parent->AppendChild(frame); |
313 return frame; | 314 return frame; |
314 } | 315 } |
315 | 316 |
316 void TestWebFrameClient::DidStartLoading(bool) { | 317 void TestWebFrameClient::DidStartLoading(bool) { |
317 ++loads_in_progress_; | 318 ++loads_in_progress_; |
318 } | 319 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 test_web_view_client_->ScheduleAnimation(); | 352 test_web_view_client_->ScheduleAnimation(); |
352 } | 353 } |
353 | 354 |
354 void TestWebViewWidgetClient::DidMeaningfulLayout( | 355 void TestWebViewWidgetClient::DidMeaningfulLayout( |
355 WebMeaningfulLayout layout_type) { | 356 WebMeaningfulLayout layout_type) { |
356 test_web_view_client_->DidMeaningfulLayout(layout_type); | 357 test_web_view_client_->DidMeaningfulLayout(layout_type); |
357 } | 358 } |
358 | 359 |
359 } // namespace FrameTestHelpers | 360 } // namespace FrameTestHelpers |
360 } // namespace blink | 361 } // namespace blink |
OLD | NEW |