1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ANDROID_WEBVIEW_BROWSER_JNI_DEPENDENCY_FACTORY_H_
6 #define ANDROID_WEBVIEW_BROWSER_JNI_DEPENDENCY_FACTORY_H_
8 #include "base/memory/ref_counted.h"
11 class ExternalVideoSurfaceContainer
;
12 class GeolocationPermissionContext
;
14 class WebContentsViewDelegate
;
15 } // namespace content
17 namespace android_webview
{
19 class AwBrowserContext
;
20 class AwQuotaManagerBridge
;
21 class AwWebPreferencesPopulater
;
23 // Used to create instances of objects under native that are used in browser.
24 class JniDependencyFactory
{
26 virtual ~JniDependencyFactory() {}
28 virtual scoped_refptr
<AwQuotaManagerBridge
> CreateAwQuotaManagerBridge(
29 AwBrowserContext
* browser_context
) = 0;
30 virtual content::GeolocationPermissionContext
* CreateGeolocationPermission(
31 AwBrowserContext
* browser_context
) = 0;
32 virtual content::WebContentsViewDelegate
* CreateViewDelegate(
33 content::WebContents
* web_contents
) = 0;
34 virtual AwWebPreferencesPopulater
* CreateWebPreferencesPopulater() = 0;
35 #if defined(VIDEO_HOLE)
36 virtual content::ExternalVideoSurfaceContainer
*
37 CreateExternalVideoSurfaceContainer(content::WebContents
* contents
) = 0;
41 } // namespace android_webview
43 #endif // ANDROID_WEBVIEW_BROWSER_JNI_DEPENDENCY_FACTORY_H_