| 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 a1871963e26520c193f0b729e39d629fe475473f..30d81ff417a2c5f31060f225e3709a5b0b02fa15 100644
|
| --- a/content/public/browser/android/content_view_core.h
|
| +++ b/content/public/browser/android/content_view_core.h
|
| @@ -18,15 +18,6 @@ class WebContents;
|
| // public interface used by native code outside of the content module.
|
| //
|
| // TODO(jrg): this is a shell. Upstream the rest.
|
| -//
|
| -// TODO(jrg): downstream, this class derives from
|
| -// base::SupportsWeakPtr<ContentViewCore>. Issues raised in
|
| -// http://codereview.chromium.org/10536066/ make us want to rethink
|
| -// ownership issues.
|
| -// FOR THE MERGE (downstream), re-add derivation from
|
| -// base::SupportsWeakPtr<ContentViewCore> to keep everything else working
|
| -// until this issue is resolved.
|
| -// http://b/6666045
|
| class ContentViewCore {
|
| public:
|
| virtual void Destroy(JNIEnv* env, jobject obj) = 0;
|
| @@ -35,6 +26,21 @@ class ContentViewCore {
|
| WebContents* web_contents);
|
| static ContentViewCore* GetNativeContentViewCore(JNIEnv* env, jobject obj);
|
|
|
| + // Convenience methods for retrieving the ContentViewCore associated with a
|
| + // WebContents. Can return NULL.
|
| + static ContentViewCore* FromWebContents(content::WebContents* web_contents);
|
| +
|
| + virtual base::android::ScopedJavaLocalRef<jobject> GetJavaObject() = 0;
|
| +
|
| + // Offer handling of a JS dialog to the content view client. Returns false
|
| + // if the client will handle the dialog, or true if we should use the
|
| + // default handling - i.e. popping up a dialog box.
|
| + virtual bool ShouldUseNativeJsModalDialog(
|
| + content::JavaScriptMessageType type,
|
| + bool is_before_unload_dialog,
|
| + const string16& message,
|
| + const string16& default_value,
|
| + jobject js_result) = 0;
|
| protected:
|
| virtual ~ContentViewCore() {};
|
| };
|
|
|