OLD | NEW |
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 #include "chrome/browser/component/navigation_interception/intercept_navigation_
delegate.h" | 5 #include "content/components/navigation_interception/intercept_navigation_delega
te.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "chrome/browser/component/navigation_interception/intercept_navigation_
resource_throttle.h" | 10 #include "content/components/navigation_interception/intercept_navigation_resour
ce_throttle.h" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 #include "content/public/browser/render_view_host.h" | 12 #include "content/public/browser/render_view_host.h" |
13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
14 #include "googleurl/src/gurl.h" | 14 #include "googleurl/src/gurl.h" |
15 #include "jni/InterceptNavigationDelegate_jni.h" | 15 #include "jni/InterceptNavigationDelegate_jni.h" |
16 #include "net/url_request/url_request.h" | 16 #include "net/url_request/url_request.h" |
17 | 17 |
18 using base::android::ConvertUTF8ToJavaString; | 18 using base::android::ConvertUTF8ToJavaString; |
19 using base::android::ScopedJavaLocalRef; | 19 using base::android::ScopedJavaLocalRef; |
20 using content::BrowserThread; | 20 using content::BrowserThread; |
21 using content::RenderViewHost; | 21 using content::RenderViewHost; |
22 using content::WebContents; | 22 using content::WebContents; |
23 | 23 |
24 namespace navigation_interception { | 24 namespace content { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 const void* kInterceptNavigationDelegateUserDataKey = | 28 const void* kInterceptNavigationDelegateUserDataKey = |
29 &kInterceptNavigationDelegateUserDataKey; | 29 &kInterceptNavigationDelegateUserDataKey; |
30 | 30 |
31 bool CheckIfShouldIgnoreNavigationOnUIThread(RenderViewHost* source, | 31 bool CheckIfShouldIgnoreNavigationOnUIThread(RenderViewHost* source, |
32 const GURL& url, | 32 const GURL& url, |
33 const content::Referrer& referrer, | 33 const content::Referrer& referrer, |
34 bool has_user_gesture) { | 34 bool has_user_gesture) { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 jstring_url.obj(), | 99 jstring_url.obj(), |
100 has_user_gesture); | 100 has_user_gesture); |
101 } | 101 } |
102 | 102 |
103 // Register native methods. | 103 // Register native methods. |
104 | 104 |
105 bool RegisterInterceptNavigationDelegate(JNIEnv* env) { | 105 bool RegisterInterceptNavigationDelegate(JNIEnv* env) { |
106 return RegisterNativesImpl(env); | 106 return RegisterNativesImpl(env); |
107 } | 107 } |
108 | 108 |
109 } // namespace navigation_interception | 109 } // namespace content |
OLD | NEW |