OLD | NEW |
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_PARTS_H_ | 5 #ifndef IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_MAIN_PARTS_H_ |
6 #define IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_MAIN_PARTS_H_ | 6 #define IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_MAIN_PARTS_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
| 10 #include "base/macros.h" |
10 #include "ios/web/public/app/web_main_parts.h" | 11 #include "ios/web/public/app/web_main_parts.h" |
11 | 12 |
12 @protocol CWVDelegate; | 13 namespace base { |
| 14 class CommandLine; |
| 15 } |
13 | 16 |
14 namespace ios_web_view { | 17 namespace ios_web_view { |
15 | 18 |
| 19 class ApplicationContextImpl; |
| 20 |
16 // WebView implementation of WebMainParts. | 21 // WebView implementation of WebMainParts. |
17 class WebViewWebMainParts : public web::WebMainParts { | 22 class WebViewWebMainParts : public web::WebMainParts { |
18 public: | 23 public: |
19 WebViewWebMainParts(); | 24 explicit WebViewWebMainParts(const base::CommandLine& parsed_command_line); |
20 ~WebViewWebMainParts() override; | 25 ~WebViewWebMainParts() override; |
21 | 26 |
22 // WebMainParts implementation. | 27 private: |
23 void PreMainMessageLoopRun() override; | 28 // web::WebMainParts implementation. |
| 29 void PreMainMessageLoopStart() override; |
| 30 void PreCreateThreads() override; |
| 31 void PostMainMessageLoopRun() override; |
| 32 void PostDestroyThreads() override; |
| 33 |
| 34 const base::CommandLine& parsed_command_line_; |
| 35 |
| 36 std::unique_ptr<ApplicationContextImpl> application_context_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(WebViewWebMainParts); |
24 }; | 39 }; |
25 | 40 |
26 } // namespace ios_web_view | 41 } // namespace ios_web_view |
27 | 42 |
28 #endif // IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_MAIN_PARTS_H_ | 43 #endif // IOS_WEB_VIEW_INTERNAL_WEB_VIEW_WEB_MAIN_PARTS_H_ |
OLD | NEW |