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

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: 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 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 21 matching lines...) Expand all
32 public: 32 public:
33 // Returns the AwContents instance associated with |web_contents|, or NULL. 33 // Returns the AwContents instance associated with |web_contents|, or NULL.
34 static AwContents* FromWebContents(content::WebContents* web_contents); 34 static AwContents* FromWebContents(content::WebContents* web_contents);
35 35
36 AwContents(JNIEnv* env, 36 AwContents(JNIEnv* env,
37 jobject obj, 37 jobject obj,
38 jobject web_contents_delegate, 38 jobject web_contents_delegate,
39 bool private_browsing); 39 bool private_browsing);
40 ~AwContents(); 40 ~AwContents();
41 41
42 AwWebContentsDelegate* GetAwWebContentsDelegate() const;
43
42 // |handler| is an instance of 44 // |handler| is an instance of
43 // org.chromium.android_webview.AwHttpAuthHandler. 45 // org.chromium.android_webview.AwHttpAuthHandler.
44 void onReceivedHttpAuthRequest(const base::android::JavaRef<jobject>& handler, 46 void onReceivedHttpAuthRequest(const base::android::JavaRef<jobject>& handler,
45 const std::string& host, 47 const std::string& host,
46 const std::string& realm); 48 const std::string& realm);
47 49
48 // Methods called from Java. 50 // Methods called from Java.
49 jint GetWebContents(JNIEnv* env, jobject obj); 51 jint GetWebContents(JNIEnv* env, jobject obj);
50 void Destroy(JNIEnv* env, jobject obj); 52 void Destroy(JNIEnv* env, jobject obj);
51 void DocumentHasImages(JNIEnv* env, jobject obj, jobject message); 53 void DocumentHasImages(JNIEnv* env, jobject obj, jobject message);
52 54
53 private: 55 private:
54 JavaObjectWeakGlobalRef java_ref_; 56 JavaObjectWeakGlobalRef java_ref_;
55 scoped_ptr<AwContentsContainer> contents_container_; 57 scoped_ptr<AwContentsContainer> contents_container_;
56 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; 58 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_;
57 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; 59 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_;
58 60
59 DISALLOW_COPY_AND_ASSIGN(AwContents); 61 DISALLOW_COPY_AND_ASSIGN(AwContents);
60 }; 62 };
61 63
62 bool RegisterAwContents(JNIEnv* env); 64 bool RegisterAwContents(JNIEnv* env);
63 65
64 } // namespace android_webview 66 } // namespace android_webview
65 67
66 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ 68 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698