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

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

Issue 2705293014: Created web::UserAgentType. (Closed)
Patch Set: rebase + compile fix Created 3 years, 9 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 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #import "ios/web/public/web_client.h" 10 #import "ios/web/public/web_client.h"
11 11
12 @protocol CWVDelegate; 12 @protocol CWVDelegate;
13 13
14 namespace ios_web_view { 14 namespace ios_web_view {
15 class WebViewBrowserState; 15 class WebViewBrowserState;
16 class WebViewWebMainParts; 16 class WebViewWebMainParts;
17 17
18 // WebView implementation of WebClient. 18 // WebView implementation of WebClient.
19 class WebViewWebClient : public web::WebClient { 19 class WebViewWebClient : public web::WebClient {
20 public: 20 public:
21 explicit WebViewWebClient(id<CWVDelegate> delegate); 21 explicit WebViewWebClient(id<CWVDelegate> delegate);
22 ~WebViewWebClient() override; 22 ~WebViewWebClient() override;
23 23
24 // WebClient implementation. 24 // WebClient implementation.
25 web::WebMainParts* CreateWebMainParts() override; 25 web::WebMainParts* CreateWebMainParts() override;
26 std::string GetProduct() const override; 26 std::string GetProduct() const override;
27 std::string GetUserAgent(bool desktop_user_agent) const override; 27 std::string GetUserAgent(web::UserAgentType type) const override;
28 28
29 // Normal browser state associated with the receiver. 29 // Normal browser state associated with the receiver.
30 WebViewBrowserState* browser_state() const; 30 WebViewBrowserState* browser_state() const;
31 // Off the record browser state associated with the receiver. 31 // Off the record browser state associated with the receiver.
32 WebViewBrowserState* off_the_record_browser_state() const; 32 WebViewBrowserState* off_the_record_browser_state() const;
33 33
34 private: 34 private:
35 // This object's delegate. 35 // This object's delegate.
36 __weak id<CWVDelegate> delegate_; 36 __weak id<CWVDelegate> delegate_;
37 37
38 // The WebMainParts created by |CreateWebMainParts()|. 38 // The WebMainParts created by |CreateWebMainParts()|.
39 WebViewWebMainParts* web_main_parts_; 39 WebViewWebMainParts* web_main_parts_;
40 40
41 DISALLOW_COPY_AND_ASSIGN(WebViewWebClient); 41 DISALLOW_COPY_AND_ASSIGN(WebViewWebClient);
42 }; 42 };
43 43
44 } // namespace ios_web_view 44 } // namespace ios_web_view
45 45
46 #endif // IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_CLIENT_H_ 46 #endif // IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_CLIENT_H_
OLDNEW
« no previous file with comments | « ios/web_view/internal/web_view_url_request_context_getter.mm ('k') | ios/web_view/internal/web_view_web_client.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698