| Index: content/public/browser/android/content_view_core.h
|
| diff --git a/content/public/browser/android/content_view_core.h b/content/public/browser/android/content_view_core.h
|
| index 2c82ab15ba634d0e9f9c57d51829008ca2fc9e7c..cf78dbf892efba153400410c3f9810046008743a 100644
|
| --- a/content/public/browser/android/content_view_core.h
|
| +++ b/content/public/browser/android/content_view_core.h
|
| @@ -55,6 +55,34 @@ class ContentViewCore {
|
| virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0;
|
|
|
| virtual ui::WindowAndroid* GetWindowAndroid() = 0;
|
| + static ContentViewCore* FromWebContents(content::WebContents* web_contents);
|
| +
|
| + // Returns the WebContents for this ContentViewCore. The caller becomes the
|
| + // owner of the returned WebContents and should ensure it lives as long as
|
| + // this ContentViewCore.
|
| + virtual content::WebContents* AcquireWebContents() = 0;
|
| +
|
| + // Called when the embedder replaces the actual WebContents, in
|
| + // the prerendering case for example.
|
| + // Important notes: the |old_web_contents| is released, meaning that it is
|
| + // not deleted even if the ContentViewCore owns it. Also, the owner state is
|
| + // carried over to the |new_web_contents|, meaning if the current WebContents
|
| + // is owned, the new one will be owned as well (and vice-versa).
|
| + virtual void ReplaceWebContents(content::WebContents* old_web_contents,
|
| + content::WebContents* new_web_contents)= 0;
|
| +
|
| + // --------------------------------------------------------------------------
|
| + // Public methods that call to Java via JNI
|
| + // --------------------------------------------------------------------------
|
| +
|
| + virtual void DidStartLoading() = 0;
|
| + virtual void OnPageStarted(const GURL& validated_url) = 0;
|
| + virtual void OnPageFinished(const GURL& validated_url) = 0;
|
| + virtual void OnPageFailed(int error_code, const string16& description,
|
| + const GURL& failingUrl) = 0;
|
| +
|
| + virtual void OnDidCommitMainFrame(const GURL& url, const GURL& base_url) = 0;
|
| +
|
| protected:
|
| virtual ~ContentViewCore() {};
|
| };
|
|
|