| 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_AW_BROWSER_DELEGATE_H_ | 5 #ifndef ANDROID_WEBVIEW_AW_BROWSER_DELEGATE_H_ |
| 6 #define ANDROID_WEBVIEW_AW_BROWSER_DELEGATE_H_ | 6 #define ANDROID_WEBVIEW_AW_BROWSER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 virtual ~AwBrowserDependencyFactory(); | 30 virtual ~AwBrowserDependencyFactory(); |
| 31 | 31 |
| 32 // Allows the lib executive to inject the delegate instance. Ownership of | 32 // Allows the lib executive to inject the delegate instance. Ownership of |
| 33 // |delegate| is NOT transferred, but the object must be long-lived. | 33 // |delegate| is NOT transferred, but the object must be long-lived. |
| 34 static void SetInstance(AwBrowserDependencyFactory* delegate); | 34 static void SetInstance(AwBrowserDependencyFactory* delegate); |
| 35 | 35 |
| 36 // Returns the singleton instance. |SetInstance| must have been called. | 36 // Returns the singleton instance. |SetInstance| must have been called. |
| 37 static AwBrowserDependencyFactory* GetInstance(); | 37 static AwBrowserDependencyFactory* GetInstance(); |
| 38 | 38 |
| 39 // Returns the current browser context based on the specified mode. | 39 // Returns the current browser context based on the specified mode. |
| 40 virtual content::BrowserContext* GetBrowserContext(bool incognito) = 0; | 40 virtual content::BrowserContext* GetBrowserContext() = 0; |
| 41 | 41 |
| 42 // Constructs and returns ownership of a WebContents instance. | 42 // Constructs and returns ownership of a WebContents instance. |
| 43 virtual content::WebContents* CreateWebContents(bool incognito) = 0; | 43 virtual content::WebContents* CreateWebContents() = 0; |
| 44 | 44 |
| 45 protected: | 45 protected: |
| 46 AwBrowserDependencyFactory(); | 46 AwBrowserDependencyFactory(); |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 DISALLOW_COPY_AND_ASSIGN(AwBrowserDependencyFactory); | 49 DISALLOW_COPY_AND_ASSIGN(AwBrowserDependencyFactory); |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 } // namespace android_webview | 52 } // namespace android_webview |
| 53 | 53 |
| 54 #endif // ANDROID_WEBVIEW_AW_BROWSER_DELEGATE_H_ | 54 #endif // ANDROID_WEBVIEW_AW_BROWSER_DELEGATE_H_ |
| OLD | NEW |