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

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

Issue 2800433002: Remove CWVDelegate. (Closed)
Patch Set: Respond to comments. Created 3 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 IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_MAIN_DELEGATE_H_ 5 #ifndef IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_MAIN_DELEGATE_H_
6 #define IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_MAIN_DELEGATE_H_ 6 #define IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_MAIN_DELEGATE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "ios/web/public/app/web_main_delegate.h" 12 #include "ios/web/public/app/web_main_delegate.h"
12 13
13 @protocol CWVDelegate;
14
15 namespace ios_web_view { 14 namespace ios_web_view {
16 class WebViewWebClient; 15 class WebViewWebClient;
17 16
18 // WebView implementation of WebMainDelegate. 17 // WebView implementation of WebMainDelegate.
19 class WebViewWebMainDelegate : public web::WebMainDelegate { 18 class WebViewWebMainDelegate : public web::WebMainDelegate {
20 public: 19 public:
21 explicit WebViewWebMainDelegate(id<CWVDelegate> delegate); 20 explicit WebViewWebMainDelegate(const std::string& user_agent_product);
22 ~WebViewWebMainDelegate() override; 21 ~WebViewWebMainDelegate() override;
23 22
24 // WebMainDelegate implementation. 23 // WebMainDelegate implementation.
25 void BasicStartupComplete() override; 24 void BasicStartupComplete() override;
26 25
27 private: 26 private:
28 // This object's delegate. 27 // The name of the product to be used in the User Agent string.
29 __weak id<CWVDelegate> delegate_; 28 std::string user_agent_product_;
30 29
31 // The content and web clients registered by this object. 30 // The content and web clients registered by this object.
32 std::unique_ptr<WebViewWebClient> web_client_; 31 std::unique_ptr<WebViewWebClient> web_client_;
33 32
34 DISALLOW_COPY_AND_ASSIGN(WebViewWebMainDelegate); 33 DISALLOW_COPY_AND_ASSIGN(WebViewWebMainDelegate);
35 }; 34 };
36 35
37 } // namespace ios_web_view 36 } // namespace ios_web_view
38 37
39 #endif // IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_MAIN_DELEGATE_H_ 38 #endif // IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_MAIN_DELEGATE_H_
OLDNEW
« no previous file with comments | « ios/web_view/internal/web_view_web_client.mm ('k') | ios/web_view/internal/web_view_web_main_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698