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

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

Issue 10946008: Componentize IgnoreNavigationResourceThrottle and add chrome and webview specific implementations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved jni to component, added Java test code Created 8 years, 2 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 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 const GURL& origin_url, 46 const GURL& origin_url,
47 const string16& message_text, 47 const string16& message_text,
48 const string16& default_prompt_text, 48 const string16& default_prompt_text,
49 const base::android::ScopedJavaLocalRef<jobject>& js_result); 49 const base::android::ScopedJavaLocalRef<jobject>& js_result);
50 50
51 void RunBeforeUnloadDialog( 51 void RunBeforeUnloadDialog(
52 const GURL& origin_url, 52 const GURL& origin_url,
53 const string16& message_text, 53 const string16& message_text,
54 const base::android::ScopedJavaLocalRef<jobject>& js_result); 54 const base::android::ScopedJavaLocalRef<jobject>& js_result);
55 55
56 AwWebContentsDelegate* GetAwWebContentsDelegate() const;
joth 2012/10/03 22:01:32 I missed where this is used. If we can avoid this
mkosiba (inactive) 2012/10/08 15:09:12 this was left over from the previous approach. rem
57
56 // |handler| is an instance of 58 // |handler| is an instance of
57 // org.chromium.android_webview.AwHttpAuthHandler. 59 // org.chromium.android_webview.AwHttpAuthHandler.
58 void onReceivedHttpAuthRequest(const base::android::JavaRef<jobject>& handler, 60 void onReceivedHttpAuthRequest(const base::android::JavaRef<jobject>& handler,
59 const std::string& host, 61 const std::string& host,
60 const std::string& realm); 62 const std::string& realm);
61 63
62 // Methods called from Java. 64 // Methods called from Java.
63 jint GetWebContents(JNIEnv* env, jobject obj); 65 jint GetWebContents(JNIEnv* env, jobject obj);
64 void Destroy(JNIEnv* env, jobject obj); 66 void Destroy(JNIEnv* env, jobject obj);
65 void DocumentHasImages(JNIEnv* env, jobject obj, jobject message); 67 void DocumentHasImages(JNIEnv* env, jobject obj, jobject message);
66 void GenerateMHTML(JNIEnv* env, jobject obj, jstring jpath, jobject callback); 68 void GenerateMHTML(JNIEnv* env, jobject obj, jstring jpath, jobject callback);
67 void SetIoThreadClient(JNIEnv* env, jobject obj, jobject client); 69 void SetIoThreadClient(JNIEnv* env, jobject obj, jobject client);
70 void SetInterceptNavigationDelegate(JNIEnv* env, jobject obj,
71 jobject delegate);
68 72
69 // Find-in-page API and related methods. 73 // Find-in-page API and related methods.
70 jint FindAllSync(JNIEnv* env, jobject obj, jstring search_string); 74 jint FindAllSync(JNIEnv* env, jobject obj, jstring search_string);
71 void FindAllAsync(JNIEnv* env, jobject obj, jstring search_string); 75 void FindAllAsync(JNIEnv* env, jobject obj, jstring search_string);
72 void FindNext(JNIEnv* env, jobject obj, jboolean forward); 76 void FindNext(JNIEnv* env, jobject obj, jboolean forward);
73 void ClearMatches(JNIEnv* env, jobject obj); 77 void ClearMatches(JNIEnv* env, jobject obj);
74 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); 78 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files);
75 79
76 FindHelper* GetFindHelper(); 80 FindHelper* GetFindHelper();
77 81
78 // FindHelper::Listener implementation. 82 // FindHelper::Listener implementation.
79 virtual void OnFindResultReceived(int active_ordinal, 83 virtual void OnFindResultReceived(int active_ordinal,
80 int match_count, 84 int match_count,
81 bool finished) OVERRIDE; 85 bool finished) OVERRIDE;
82 private: 86 private:
83 JavaObjectWeakGlobalRef java_ref_; 87 JavaObjectWeakGlobalRef java_ref_;
84 scoped_ptr<AwContentsContainer> contents_container_; 88 scoped_ptr<AwContentsContainer> contents_container_;
85 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; 89 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_;
86 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; 90 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_;
87 scoped_ptr<FindHelper> find_helper_; 91 scoped_ptr<FindHelper> find_helper_;
88 92
89 DISALLOW_COPY_AND_ASSIGN(AwContents); 93 DISALLOW_COPY_AND_ASSIGN(AwContents);
90 }; 94 };
91 95
92 bool RegisterAwContents(JNIEnv* env); 96 bool RegisterAwContents(JNIEnv* env);
93 97
94 } // namespace android_webview 98 } // namespace android_webview
95 99
96 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ 100 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698