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

Side by Side Diff: components/test_runner/web_test_interfaces.h

Issue 1921923002: Convert //components/[o-t]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_
6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_
7 7
8 #include <memory>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "components/test_runner/test_runner_export.h" 12 #include "components/test_runner/test_runner_export.h"
13 13
14 namespace blink { 14 namespace blink {
15 class WebAppBannerClient; 15 class WebAppBannerClient;
16 class WebAudioDevice; 16 class WebAudioDevice;
17 class WebFrame; 17 class WebFrame;
18 class WebFrameClient; 18 class WebFrameClient;
19 class WebMediaStreamCenter; 19 class WebMediaStreamCenter;
20 class WebMediaStreamCenterClient; 20 class WebMediaStreamCenterClient;
21 class WebMIDIAccessor; 21 class WebMIDIAccessor;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 blink::WebMediaStreamCenter* CreateMediaStreamCenter( 55 blink::WebMediaStreamCenter* CreateMediaStreamCenter(
56 blink::WebMediaStreamCenterClient* client); 56 blink::WebMediaStreamCenterClient* client);
57 blink::WebRTCPeerConnectionHandler* CreateWebRTCPeerConnectionHandler( 57 blink::WebRTCPeerConnectionHandler* CreateWebRTCPeerConnectionHandler(
58 blink::WebRTCPeerConnectionHandlerClient* client); 58 blink::WebRTCPeerConnectionHandlerClient* client);
59 59
60 blink::WebMIDIAccessor* CreateMIDIAccessor( 60 blink::WebMIDIAccessor* CreateMIDIAccessor(
61 blink::WebMIDIAccessorClient* client); 61 blink::WebMIDIAccessorClient* client);
62 62
63 blink::WebAudioDevice* CreateAudioDevice(double sample_rate); 63 blink::WebAudioDevice* CreateAudioDevice(double sample_rate);
64 64
65 scoped_ptr<blink::WebAppBannerClient> CreateAppBannerClient(); 65 std::unique_ptr<blink::WebAppBannerClient> CreateAppBannerClient();
66 66
67 TestInterfaces* GetTestInterfaces(); 67 TestInterfaces* GetTestInterfaces();
68 68
69 // Creates a WebFrameClient implementation providing test behavior (i.e. 69 // Creates a WebFrameClient implementation providing test behavior (i.e.
70 // forwarding javascript console output to the test harness). The caller 70 // forwarding javascript console output to the test harness). The caller
71 // should guarantee that the returned object won't be used beyond the lifetime 71 // should guarantee that the returned object won't be used beyond the lifetime
72 // of WebTestInterfaces and/or the lifetime of |web_test_proxy_base|. 72 // of WebTestInterfaces and/or the lifetime of |web_test_proxy_base|.
73 scoped_ptr<WebFrameTestClient> CreateWebFrameTestClient( 73 std::unique_ptr<WebFrameTestClient> CreateWebFrameTestClient(
74 WebTestProxyBase* web_test_proxy_base); 74 WebTestProxyBase* web_test_proxy_base);
75 75
76 // Creates a WebViewClient implementation providing test behavior (i.e. 76 // Creates a WebViewClient implementation providing test behavior (i.e.
77 // providing a mocked speech recognizer). The caller should guarantee that 77 // providing a mocked speech recognizer). The caller should guarantee that
78 // the returned pointer won't be used beyond the lifetime of WebTestInterfaces 78 // the returned pointer won't be used beyond the lifetime of WebTestInterfaces
79 // and/or the lifetime of |web_test_proxy_base|. 79 // and/or the lifetime of |web_test_proxy_base|.
80 scoped_ptr<WebViewTestClient> CreateWebViewTestClient( 80 std::unique_ptr<WebViewTestClient> CreateWebViewTestClient(
81 WebTestProxyBase* web_test_proxy_base); 81 WebTestProxyBase* web_test_proxy_base);
82 82
83 // Gets a list of currently opened windows created by the current test. 83 // Gets a list of currently opened windows created by the current test.
84 std::vector<blink::WebView*> GetWindowList(); 84 std::vector<blink::WebView*> GetWindowList();
85 85
86 private: 86 private:
87 scoped_ptr<TestInterfaces> interfaces_; 87 std::unique_ptr<TestInterfaces> interfaces_;
88 88
89 DISALLOW_COPY_AND_ASSIGN(WebTestInterfaces); 89 DISALLOW_COPY_AND_ASSIGN(WebTestInterfaces);
90 }; 90 };
91 91
92 } // namespace test_runner 92 } // namespace test_runner
93 93
94 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_ 94 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_INTERFACES_H_
OLDNEW
« no previous file with comments | « components/test_runner/web_frame_test_proxy.h ('k') | components/test_runner/web_test_interfaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698