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 "modules/presentation/PresentationReceiver.h" | 5 #include "modules/presentation/PresentationReceiver.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
10 #include "bindings/core/v8/V8BindingForTesting.h" | 10 #include "bindings/core/v8/V8BindingForTesting.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 return startPresentation_(presentation_urls, callbacks); | 40 return startPresentation_(presentation_urls, callbacks); |
41 } | 41 } |
42 void ReconnectPresentation( | 42 void ReconnectPresentation( |
43 const WebVector<WebURL>& presentation_urls, | 43 const WebVector<WebURL>& presentation_urls, |
44 const WebString& presentation_id, | 44 const WebString& presentation_id, |
45 std::unique_ptr<WebPresentationConnectionCallbacks> callbacks) override { | 45 std::unique_ptr<WebPresentationConnectionCallbacks> callbacks) override { |
46 return reconnectPresentation_(presentation_urls, presentation_id, | 46 return reconnectPresentation_(presentation_urls, presentation_id, |
47 callbacks); | 47 callbacks); |
48 } | 48 } |
49 | 49 |
50 void GetAvailability(const WebVector<WebURL>& availability_ur_ls, | 50 void GetAvailability(const WebVector<WebURL>& availability_urls, |
51 std::unique_ptr<WebPresentationAvailabilityCallbacks> | 51 std::unique_ptr<WebPresentationAvailabilityCallbacks> |
52 callbacks) override { | 52 callbacks) override { |
53 return getAvailability_(availability_ur_ls, callbacks); | 53 return getAvailability_(availability_urls, callbacks); |
54 } | 54 } |
55 | 55 |
56 public: | 56 public: |
57 MOCK_METHOD1(SetController, void(WebPresentationController*)); | 57 MOCK_METHOD1(SetController, void(WebPresentationController*)); |
58 | 58 |
59 MOCK_METHOD1(SetReceiver, void(WebPresentationReceiver*)); | 59 MOCK_METHOD1(SetReceiver, void(WebPresentationReceiver*)); |
60 | 60 |
61 MOCK_METHOD2(startPresentation_, | 61 MOCK_METHOD2(startPresentation_, |
62 void(const WebVector<WebURL>& presentationUrls, | 62 void(const WebVector<WebURL>& presentationUrls, |
63 std::unique_ptr<WebPresentationConnectionCallbacks>&)); | 63 std::unique_ptr<WebPresentationConnectionCallbacks>&)); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 TEST_F(PresentationReceiverTest, CreateReceiver) { | 223 TEST_F(PresentationReceiverTest, CreateReceiver) { |
224 MockWebPresentationClient client; | 224 MockWebPresentationClient client; |
225 EXPECT_CALL(client, SetReceiver(testing::_)); | 225 EXPECT_CALL(client, SetReceiver(testing::_)); |
226 | 226 |
227 V8TestingScope scope; | 227 V8TestingScope scope; |
228 new PresentationReceiver(&scope.GetFrame(), &client); | 228 new PresentationReceiver(&scope.GetFrame(), &client); |
229 } | 229 } |
230 | 230 |
231 } // namespace blink | 231 } // namespace blink |
OLD | NEW |