Home | History | Annotate | Download | only in browser
      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.
      4 
      5 #ifndef ANDROID_WEBVIEW_BROWSER_JNI_DEPENDENCY_FACTORY_H_
      6 #define ANDROID_WEBVIEW_BROWSER_JNI_DEPENDENCY_FACTORY_H_
      7 
      8 #include "base/memory/ref_counted.h"
      9 
     10 namespace content {
     11 class GeolocationPermissionContext;
     12 class WebContents;
     13 class WebContentsViewDelegate;
     14 }  // namespace content
     15 
     16 namespace android_webview {
     17 
     18 class AwBrowserContext;
     19 class AwQuotaManagerBridge;
     20 class AwWebPreferencesPopulater;
     21 
     22 // Used to create instances of objects under native that are used in browser.
     23 class JniDependencyFactory {
     24  public:
     25   virtual ~JniDependencyFactory() {}
     26 
     27   virtual scoped_refptr<AwQuotaManagerBridge> CreateAwQuotaManagerBridge(
     28       AwBrowserContext* browser_context) = 0;
     29   virtual content::GeolocationPermissionContext* CreateGeolocationPermission(
     30       AwBrowserContext* browser_context) = 0;
     31   virtual content::WebContentsViewDelegate* CreateViewDelegate(
     32       content::WebContents* web_contents) = 0;
     33   virtual AwWebPreferencesPopulater* CreateWebPreferencesPopulater() = 0;
     34 };
     35 
     36 }  // namespace android_webview
     37 
     38 #endif  // ANDROID_WEBVIEW_BROWSER_JNI_DEPENDENCY_FACTORY_H_
     39