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

Side by Side Diff: android_webview/native/aw_contents.h

Issue 11348075: [Android WebView] AwContentsClient.shouldCreate window callback part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ 6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 const base::android::ScopedJavaLocalRef<jobject>& js_result); 60 const base::android::ScopedJavaLocalRef<jobject>& js_result);
61 61
62 // |handler| is an instance of 62 // |handler| is an instance of
63 // org.chromium.android_webview.AwHttpAuthHandler. 63 // org.chromium.android_webview.AwHttpAuthHandler.
64 void onReceivedHttpAuthRequest(const base::android::JavaRef<jobject>& handler, 64 void onReceivedHttpAuthRequest(const base::android::JavaRef<jobject>& handler,
65 const std::string& host, 65 const std::string& host,
66 const std::string& realm); 66 const std::string& realm);
67 67
68 // Methods called from Java. 68 // Methods called from Java.
69 jint GetWebContents(JNIEnv* env, jobject obj); 69 jint GetWebContents(JNIEnv* env, jobject obj);
70 void SetWebContents(JNIEnv* env, jobject obj, jint web_contents);
71
70 void DidInitializeContentViewCore(JNIEnv* env, jobject obj, 72 void DidInitializeContentViewCore(JNIEnv* env, jobject obj,
71 jint content_view_core); 73 jint content_view_core);
72 void Destroy(JNIEnv* env, jobject obj); 74 void Destroy(JNIEnv* env, jobject obj);
73 void DocumentHasImages(JNIEnv* env, jobject obj, jobject message); 75 void DocumentHasImages(JNIEnv* env, jobject obj, jobject message);
74 void GenerateMHTML(JNIEnv* env, jobject obj, jstring jpath, jobject callback); 76 void GenerateMHTML(JNIEnv* env, jobject obj, jstring jpath, jobject callback);
75 void SetIoThreadClient(JNIEnv* env, jobject obj, jobject client); 77 void SetIoThreadClient(JNIEnv* env, jobject obj, jobject client);
76 void SetInterceptNavigationDelegate(JNIEnv* env, jobject obj, 78 void SetInterceptNavigationDelegate(JNIEnv* env, jobject obj,
77 jobject delegate); 79 jobject delegate);
78 base::android::ScopedJavaLocalRef<jbyteArray> GetCertificate( 80 base::android::ScopedJavaLocalRef<jbyteArray> GetCertificate(
79 JNIEnv* env, jobject obj); 81 JNIEnv* env, jobject obj);
(...skipping 20 matching lines...) Expand all
100 102
101 // FindHelper::Listener implementation. 103 // FindHelper::Listener implementation.
102 virtual void OnFindResultReceived(int active_ordinal, 104 virtual void OnFindResultReceived(int active_ordinal,
103 int match_count, 105 int match_count,
104 bool finished) OVERRIDE; 106 bool finished) OVERRIDE;
105 107
106 // content::Compositor::Client implementation. 108 // content::Compositor::Client implementation.
107 virtual void ScheduleComposite() OVERRIDE; 109 virtual void ScheduleComposite() OVERRIDE;
108 virtual void OnSwapBuffersCompleted() OVERRIDE; 110 virtual void OnSwapBuffersCompleted() OVERRIDE;
109 111
112 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending);
113 jint ReleasePopupWebContents(JNIEnv* env, jobject obj);
114
110 private: 115 private:
111 void Invalidate(); 116 void Invalidate();
117 void SetWebContents(content::WebContents* web_contents);
112 118
113 JavaObjectWeakGlobalRef java_ref_; 119 JavaObjectWeakGlobalRef java_ref_;
114 scoped_ptr<content::WebContents> web_contents_; 120 scoped_ptr<content::WebContents> web_contents_;
115 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; 121 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_;
116 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; 122 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_;
117 scoped_ptr<FindHelper> find_helper_; 123 scoped_ptr<FindHelper> find_helper_;
118 scoped_ptr<content::Compositor> compositor_; 124 scoped_ptr<content::Compositor> compositor_;
119 // State to track if the view is visible, and if the compositor knows yet. 125 // State to track if the view is visible, and if the compositor knows yet.
120 bool view_visible_; 126 bool view_visible_;
121 bool compositor_visible_; 127 bool compositor_visible_;
122 bool is_composite_pending_; 128 bool is_composite_pending_;
129 scoped_ptr<content::WebContents> pending_contents_;
123 130
124 DISALLOW_COPY_AND_ASSIGN(AwContents); 131 DISALLOW_COPY_AND_ASSIGN(AwContents);
125 }; 132 };
126 133
127 bool RegisterAwContents(JNIEnv* env); 134 bool RegisterAwContents(JNIEnv* env);
128 135
129 } // namespace android_webview 136 } // namespace android_webview
130 137
131 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ 138 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698