OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 ANDROID_WEBVIEW_LIB_MAIN_AW_MAIN_DELEGATE_H_ | 5 #ifndef ANDROID_WEBVIEW_LIB_MAIN_AW_MAIN_DELEGATE_H_ |
6 #define ANDROID_WEBVIEW_LIB_MAIN_AW_MAIN_DELEGATE_H_ | 6 #define ANDROID_WEBVIEW_LIB_MAIN_AW_MAIN_DELEGATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "android_webview/browser/jni_dependency_factory.h" | 10 #include "android_webview/browser/jni_dependency_factory.h" |
11 #include "android_webview/common/aw_content_client.h" | 11 #include "android_webview/common/aw_content_client.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "content/public/app/content_main_delegate.h" | 14 #include "content/public/app/content_main_delegate.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 class BrowserMainRunner; | 17 class BrowserMainRunner; |
18 } | 18 } |
19 | 19 |
20 namespace android_webview { | 20 namespace android_webview { |
21 | 21 |
22 class AwContentBrowserClient; | 22 class AwContentBrowserClient; |
23 class AwContentGpuClient; | 23 class AwContentGpuClient; |
24 class AwContentRendererClient; | 24 class AwContentRendererClient; |
25 | 25 |
26 // Android WebView implementation of ContentMainDelegate. | 26 // Android WebView implementation of ContentMainDelegate. The methods in |
| 27 // this class runs per process, (browser and renderer) so when making changes |
| 28 // make sure to properly conditionalize for browser vs. renderer wherever |
| 29 // needed. |
27 class AwMainDelegate : public content::ContentMainDelegate, | 30 class AwMainDelegate : public content::ContentMainDelegate, |
28 public JniDependencyFactory { | 31 public JniDependencyFactory { |
29 public: | 32 public: |
30 AwMainDelegate(); | 33 AwMainDelegate(); |
31 ~AwMainDelegate() override; | 34 ~AwMainDelegate() override; |
32 | 35 |
33 private: | 36 private: |
34 // content::ContentMainDelegate implementation: | 37 // content::ContentMainDelegate implementation: |
35 bool BasicStartupComplete(int* exit_code) override; | 38 bool BasicStartupComplete(int* exit_code) override; |
36 void PreSandboxStartup() override; | 39 void PreSandboxStartup() override; |
(...skipping 23 matching lines...) Expand all Loading... |
60 std::unique_ptr<AwContentBrowserClient> content_browser_client_; | 63 std::unique_ptr<AwContentBrowserClient> content_browser_client_; |
61 std::unique_ptr<AwContentGpuClient> content_gpu_client_; | 64 std::unique_ptr<AwContentGpuClient> content_gpu_client_; |
62 std::unique_ptr<AwContentRendererClient> content_renderer_client_; | 65 std::unique_ptr<AwContentRendererClient> content_renderer_client_; |
63 | 66 |
64 DISALLOW_COPY_AND_ASSIGN(AwMainDelegate); | 67 DISALLOW_COPY_AND_ASSIGN(AwMainDelegate); |
65 }; | 68 }; |
66 | 69 |
67 } // namespace android_webview | 70 } // namespace android_webview |
68 | 71 |
69 #endif // ANDROID_WEBVIEW_LIB_MAIN_AW_MAIN_DELEGATE_H_ | 72 #endif // ANDROID_WEBVIEW_LIB_MAIN_AW_MAIN_DELEGATE_H_ |
OLD | NEW |