Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(791)

Side by Side Diff: content/public/browser/android/content_view_core.h

Issue 10911131: Upstream JavaBridge tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding back JavaBridge test files Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_CONTENT_VIEW_CORE_H_
7 7
8 #include "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include <jni.h> 9 #include <jni.h>
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 virtual void SelectBetweenCoordinates(JNIEnv* env, jobject obj, 48 virtual void SelectBetweenCoordinates(JNIEnv* env, jobject obj,
49 jint x1, jint y1, jint x2, jint y2) = 0; 49 jint x1, jint y1, jint x2, jint y2) = 0;
50 50
51 // -------------------------------------------------------------------------- 51 // --------------------------------------------------------------------------
52 // Methods called from native code 52 // Methods called from native code
53 // -------------------------------------------------------------------------- 53 // --------------------------------------------------------------------------
54 54
55 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0; 55 virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0;
56 56
57 virtual ui::WindowAndroid* GetWindowAndroid() = 0; 57 virtual ui::WindowAndroid* GetWindowAndroid() = 0;
58 static ContentViewCore* FromWebContents(content::WebContents* web_contents);
59
60 // Returns the WebContents for this ContentViewCore. The caller becomes the
61 // owner of the returned WebContents and should ensure it lives as long as
62 // this ContentViewCore.
63 virtual content::WebContents* AcquireWebContents() = 0;
64
65 // Called when the embedder replaces the actual WebContents, in
66 // the prerendering case for example.
67 // Important notes: the |old_web_contents| is released, meaning that it is
68 // not deleted even if the ContentViewCore owns it. Also, the owner state is
69 // carried over to the |new_web_contents|, meaning if the current WebContents
70 // is owned, the new one will be owned as well (and vice-versa).
71 virtual void ReplaceWebContents(content::WebContents* old_web_contents,
72 content::WebContents* new_web_contents)= 0;
73
74 // --------------------------------------------------------------------------
75 // Public methods that call to Java via JNI
76 // --------------------------------------------------------------------------
77
78 virtual void DidStartLoading() = 0;
79 virtual void OnPageStarted(const GURL& validated_url) = 0;
80 virtual void OnPageFinished(const GURL& validated_url) = 0;
81 virtual void OnPageFailed(int error_code, const string16& description,
82 const GURL& failingUrl) = 0;
83
84 virtual void OnDidCommitMainFrame(const GURL& url, const GURL& base_url) = 0;
85
58 protected: 86 protected:
59 virtual ~ContentViewCore() {}; 87 virtual ~ContentViewCore() {};
60 }; 88 };
61 89
62 }; // namespace content 90 }; // namespace content
63 91
64 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_VIEW_CORE_H_ 92 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_VIEW_CORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698