OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/test_runner/web_frame_test_client.h" | 5 #include "components/test_runner/web_frame_test_client.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 blink::WebPlugin* WebFrameTestClient::createPlugin( | 383 blink::WebPlugin* WebFrameTestClient::createPlugin( |
384 blink::WebLocalFrame* frame, | 384 blink::WebLocalFrame* frame, |
385 const blink::WebPluginParams& params) { | 385 const blink::WebPluginParams& params) { |
386 if (TestPlugin::IsSupportedMimeType(params.mimeType)) | 386 if (TestPlugin::IsSupportedMimeType(params.mimeType)) |
387 return TestPlugin::create(frame, params, delegate_); | 387 return TestPlugin::create(frame, params, delegate_); |
388 return delegate_->CreatePluginPlaceholder(frame, params); | 388 return delegate_->CreatePluginPlaceholder(frame, params); |
389 } | 389 } |
390 | 390 |
391 void WebFrameTestClient::showContextMenu( | 391 void WebFrameTestClient::showContextMenu( |
392 const blink::WebContextMenuData& context_menu_data) { | 392 const blink::WebContextMenuData& context_menu_data) { |
393 web_test_proxy_base_->event_sender()->SetContextMenuData(context_menu_data); | 393 web_frame_test_proxy_base_->event_sender()->SetContextMenuData(context_menu_da
ta); |
394 } | 394 } |
395 | 395 |
396 blink::WebUserMediaClient* WebFrameTestClient::userMediaClient() { | 396 blink::WebUserMediaClient* WebFrameTestClient::userMediaClient() { |
397 return test_runner_->getMockWebUserMediaClient(); | 397 return test_runner_->getMockWebUserMediaClient(); |
398 } | 398 } |
399 | 399 |
400 void WebFrameTestClient::loadURLExternally( | 400 void WebFrameTestClient::loadURLExternally( |
401 const blink::WebURLRequest& request, | 401 const blink::WebURLRequest& request, |
402 blink::WebNavigationPolicy policy, | 402 blink::WebNavigationPolicy policy, |
403 const blink::WebString& suggested_name, | 403 const blink::WebString& suggested_name, |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 callback->onSuccess(); | 743 callback->onSuccess(); |
744 else if (device_id == "unauthorized") | 744 else if (device_id == "unauthorized") |
745 callback->onError(blink::WebSetSinkIdError::NotAuthorized); | 745 callback->onError(blink::WebSetSinkIdError::NotAuthorized); |
746 else | 746 else |
747 callback->onError(blink::WebSetSinkIdError::NotFound); | 747 callback->onError(blink::WebSetSinkIdError::NotFound); |
748 } | 748 } |
749 | 749 |
750 void WebFrameTestClient::didClearWindowObject(blink::WebLocalFrame* frame) { | 750 void WebFrameTestClient::didClearWindowObject(blink::WebLocalFrame* frame) { |
751 web_test_proxy_base_->test_interfaces()->BindTo(frame); | 751 web_test_proxy_base_->test_interfaces()->BindTo(frame); |
752 web_test_proxy_base_->BindTo(frame); | 752 web_test_proxy_base_->BindTo(frame); |
| 753 web_frame_test_proxy_base_->BindTo(frame); |
753 } | 754 } |
754 | 755 |
755 } // namespace test_runner | 756 } // namespace test_runner |
OLD | NEW |