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

Side by Side Diff: content/shell/test_runner/web_frame_test_client.cc

Issue 2831583004: Remove redundant WebLocalFrame* parameter from DidClearWindowObject (Closed)
Patch Set: Rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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 "content/shell/test_runner/web_frame_test_client.h" 5 #include "content/shell/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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 std::unique_ptr<blink::WebSetSinkIdCallbacks> callback(web_callbacks); 715 std::unique_ptr<blink::WebSetSinkIdCallbacks> callback(web_callbacks);
716 std::string device_id = sink_id.Utf8(); 716 std::string device_id = sink_id.Utf8();
717 if (device_id == "valid" || device_id.empty()) 717 if (device_id == "valid" || device_id.empty())
718 callback->OnSuccess(); 718 callback->OnSuccess();
719 else if (device_id == "unauthorized") 719 else if (device_id == "unauthorized")
720 callback->OnError(blink::WebSetSinkIdError::kNotAuthorized); 720 callback->OnError(blink::WebSetSinkIdError::kNotAuthorized);
721 else 721 else
722 callback->OnError(blink::WebSetSinkIdError::kNotFound); 722 callback->OnError(blink::WebSetSinkIdError::kNotFound);
723 } 723 }
724 724
725 void WebFrameTestClient::DidClearWindowObject(blink::WebLocalFrame* frame) { 725 void WebFrameTestClient::DidClearWindowObject() {
726 DCHECK_EQ(frame, web_frame_test_proxy_base_->web_frame()); 726 blink::WebLocalFrame* frame = web_frame_test_proxy_base_->web_frame();
727 web_view_test_proxy_base_->test_interfaces()->BindTo(frame); 727 web_view_test_proxy_base_->test_interfaces()->BindTo(frame);
728 web_view_test_proxy_base_->BindTo(frame); 728 web_view_test_proxy_base_->BindTo(frame);
729 delegate_->GetWebWidgetTestProxyBase(frame)->BindTo(frame); 729 delegate_->GetWebWidgetTestProxyBase(frame)->BindTo(frame);
730 } 730 }
731 731
732 bool WebFrameTestClient::RunFileChooser( 732 bool WebFrameTestClient::RunFileChooser(
733 const blink::WebFileChooserParams& params, 733 const blink::WebFileChooserParams& params,
734 blink::WebFileChooserCompletion* completion) { 734 blink::WebFileChooserCompletion* completion) {
735 delegate_->PrintMessage("Mock: Opening a file chooser.\n"); 735 delegate_->PrintMessage("Mock: Opening a file chooser.\n");
736 // FIXME: Add ability to set file names to a file upload control. 736 // FIXME: Add ability to set file names to a file upload control.
737 return false; 737 return false;
738 } 738 }
739 739
740 blink::WebEffectiveConnectionType 740 blink::WebEffectiveConnectionType
741 WebFrameTestClient::GetEffectiveConnectionType() { 741 WebFrameTestClient::GetEffectiveConnectionType() {
742 return test_runner()->effective_connection_type(); 742 return test_runner()->effective_connection_type();
743 } 743 }
744 744
745 TestRunner* WebFrameTestClient::test_runner() { 745 TestRunner* WebFrameTestClient::test_runner() {
746 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner(); 746 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner();
747 } 747 }
748 748
749 } // namespace test_runner 749 } // namespace test_runner
OLDNEW
« no previous file with comments | « content/shell/test_runner/web_frame_test_client.h ('k') | content/shell/test_runner/web_frame_test_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698