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

Side by Side Diff: ios/web/public/test/test_web_client.h

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add header Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 WEB_TEST_WEB_PUBLIC_TEST_TEST_WEB_CLIENT_H_ 5 #ifndef WEB_TEST_WEB_PUBLIC_TEST_TEST_WEB_CLIENT_H_
6 #define WEB_TEST_WEB_PUBLIC_TEST_TEST_WEB_CLIENT_H_ 6 #define WEB_TEST_WEB_PUBLIC_TEST_TEST_WEB_CLIENT_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #include <memory>
noyau (Ping after 24h) 2016/04/07 13:34:05 Not needed.
11
10 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
11 #include "base/mac/scoped_nsobject.h" 13 #include "base/mac/scoped_nsobject.h"
12 #include "base/memory/scoped_ptr.h"
13 #include "ios/web/public/web_client.h" 14 #include "ios/web/public/web_client.h"
14 15
15 namespace web { 16 namespace web {
16 17
17 // A WebClient used for testing purposes. 18 // A WebClient used for testing purposes.
18 class TestWebClient : public web::WebClient { 19 class TestWebClient : public web::WebClient {
19 public: 20 public:
20 TestWebClient(); 21 TestWebClient();
21 ~TestWebClient() override; 22 ~TestWebClient() override;
22 // WebClient implementation. 23 // WebClient implementation.
23 NSString* GetEarlyPageScript(web::WebViewType web_view_type) const override; 24 NSString* GetEarlyPageScript(web::WebViewType web_view_type) const override;
24 bool WebViewsNeedActiveStateManager() const override; 25 bool WebViewsNeedActiveStateManager() const override;
25 26
26 // Changes Early Page Script for testing purposes. 27 // Changes Early Page Script for testing purposes.
27 void SetEarlyPageScript(NSString* page_script, 28 void SetEarlyPageScript(NSString* page_script,
28 web::WebViewType web_view_type); 29 web::WebViewType web_view_type);
29 30
30 private: 31 private:
31 base::scoped_nsobject<NSMutableDictionary> early_page_scripts_; 32 base::scoped_nsobject<NSMutableDictionary> early_page_scripts_;
32 }; 33 };
33 34
34 } // namespace web 35 } // namespace web
35 36
36 #endif // WEB_TEST_WEB_PUBLIC_TEST_TEST_WEB_CLIENT_H_ 37 #endif // WEB_TEST_WEB_PUBLIC_TEST_TEST_WEB_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698