| 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 "android_webview/browser/jni_dependency_factory.h" | 8 #include "android_webview/browser/jni_dependency_factory.h" |
| 9 #include "android_webview/common/aw_content_client.h" | 9 #include "android_webview/common/aw_content_client.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "content/public/app/content_main_delegate.h" | 12 #include "content/public/app/content_main_delegate.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 class BrowserMainRunner; | 15 class BrowserMainRunner; |
| 16 class ExternalVideoSurfaceContainel; | 16 class ExternalVideoSurfaceContainel; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace android_webview { | 19 namespace android_webview { |
| 20 | 20 |
| 21 class AwContentBrowserClient; | 21 class AwContentBrowserClient; |
| 22 class AwContentRendererClient; | 22 class AwContentRendererClient; |
| 23 | 23 |
| 24 // Android WebView implementation of ContentMainDelegate. | 24 // Android WebView implementation of ContentMainDelegate. |
| 25 class AwMainDelegate : public content::ContentMainDelegate, | 25 class AwMainDelegate : public content::ContentMainDelegate, |
| 26 public JniDependencyFactory { | 26 public JniDependencyFactory { |
| 27 public: | 27 public: |
| 28 AwMainDelegate(); | 28 AwMainDelegate(); |
| 29 virtual ~AwMainDelegate(); | 29 ~AwMainDelegate() override; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 // content::ContentMainDelegate implementation: | 32 // content::ContentMainDelegate implementation: |
| 33 bool BasicStartupComplete(int* exit_code) override; | 33 bool BasicStartupComplete(int* exit_code) override; |
| 34 void PreSandboxStartup() override; | 34 void PreSandboxStartup() override; |
| 35 void SandboxInitialized(const std::string& process_type) override; | 35 void SandboxInitialized(const std::string& process_type) override; |
| 36 int RunProcess( | 36 int RunProcess( |
| 37 const std::string& process_type, | 37 const std::string& process_type, |
| 38 const content::MainFunctionParams& main_function_params) override; | 38 const content::MainFunctionParams& main_function_params) override; |
| 39 void ProcessExiting(const std::string& process_type) override; | 39 void ProcessExiting(const std::string& process_type) override; |
| 40 content::ContentBrowserClient* CreateContentBrowserClient() override; | 40 content::ContentBrowserClient* CreateContentBrowserClient() override; |
| 41 content::ContentRendererClient* CreateContentRendererClient() override; | 41 content::ContentRendererClient* CreateContentRendererClient() override; |
| 42 | 42 |
| 43 // JniDependencyFactory implementation. | 43 // JniDependencyFactory implementation. |
| 44 scoped_refptr<AwQuotaManagerBridge> CreateAwQuotaManagerBridge( | 44 scoped_refptr<AwQuotaManagerBridge> CreateAwQuotaManagerBridge( |
| 45 AwBrowserContext* browser_context) override; | 45 AwBrowserContext* browser_context) override; |
| 46 content::WebContentsViewDelegate* CreateViewDelegate( | 46 content::WebContentsViewDelegate* CreateViewDelegate( |
| 47 content::WebContents* web_contents) override; | 47 content::WebContents* web_contents) override; |
| 48 AwWebPreferencesPopulater* CreateWebPreferencesPopulater() override; | 48 AwWebPreferencesPopulater* CreateWebPreferencesPopulater() override; |
| 49 AwMessagePortService* CreateAwMessagePortService() override; | 49 AwMessagePortService* CreateAwMessagePortService() override; |
| 50 #if defined(VIDEO_HOLE) | 50 #if defined(VIDEO_HOLE) |
| 51 virtual content::ExternalVideoSurfaceContainer* | 51 content::ExternalVideoSurfaceContainer* CreateExternalVideoSurfaceContainer( |
| 52 CreateExternalVideoSurfaceContainer( | 52 content::WebContents* web_contents) override; |
| 53 content::WebContents* web_contents) override; | |
| 54 #endif | 53 #endif |
| 55 | 54 |
| 56 scoped_ptr<content::BrowserMainRunner> browser_runner_; | 55 scoped_ptr<content::BrowserMainRunner> browser_runner_; |
| 57 AwContentClient content_client_; | 56 AwContentClient content_client_; |
| 58 scoped_ptr<AwContentBrowserClient> content_browser_client_; | 57 scoped_ptr<AwContentBrowserClient> content_browser_client_; |
| 59 scoped_ptr<AwContentRendererClient> content_renderer_client_; | 58 scoped_ptr<AwContentRendererClient> content_renderer_client_; |
| 60 | 59 |
| 61 DISALLOW_COPY_AND_ASSIGN(AwMainDelegate); | 60 DISALLOW_COPY_AND_ASSIGN(AwMainDelegate); |
| 62 }; | 61 }; |
| 63 | 62 |
| 64 } // namespace android_webview | 63 } // namespace android_webview |
| 65 | 64 |
| 66 #endif // ANDROID_WEBVIEW_LIB_MAIN_AW_MAIN_DELEGATE_H_ | 65 #endif // ANDROID_WEBVIEW_LIB_MAIN_AW_MAIN_DELEGATE_H_ |
| OLD | NEW |