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

Side by Side Diff: ios/web_view/internal/web_view_web_client.h

Issue 2894483003: Initialize ios/web_view translate with a system-wide URLRequestContext. (Closed)
Patch Set: Cleanup. Created 3 years, 6 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 IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_CLIENT_H_ 5 #ifndef IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_CLIENT_H_
6 #define IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_CLIENT_H_ 6 #define IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_CLIENT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #import "ios/web/public/web_client.h" 11 #import "ios/web/public/web_client.h"
12 12
13 namespace ios_web_view { 13 namespace ios_web_view {
14 class WebViewWebMainParts;
15 14
16 // WebView implementation of WebClient. 15 // WebView implementation of WebClient.
17 class WebViewWebClient : public web::WebClient { 16 class WebViewWebClient : public web::WebClient {
18 public: 17 public:
19 WebViewWebClient(); 18 WebViewWebClient();
20 ~WebViewWebClient() override; 19 ~WebViewWebClient() override;
21 20
22 // WebClient implementation. 21 // WebClient implementation.
23 web::WebMainParts* CreateWebMainParts() override; 22 web::WebMainParts* CreateWebMainParts() override;
24 std::string GetProduct() const override; 23 std::string GetProduct() const override;
25 std::string GetUserAgent(web::UserAgentType type) const override; 24 std::string GetUserAgent(web::UserAgentType type) const override;
26 NSString* GetEarlyPageScript(web::BrowserState* browser_state) const override; 25 NSString* GetEarlyPageScript(web::BrowserState* browser_state) const override;
27 26
28 private: 27 private:
29 // The WebMainParts created by |CreateWebMainParts()|.
30 WebViewWebMainParts* web_main_parts_;
31
32 DISALLOW_COPY_AND_ASSIGN(WebViewWebClient); 28 DISALLOW_COPY_AND_ASSIGN(WebViewWebClient);
33 }; 29 };
34 30
35 } // namespace ios_web_view 31 } // namespace ios_web_view
36 32
37 #endif // IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_CLIENT_H_ 33 #endif // IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698