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 "content/components/navigation_interception/intercept_navigation_delega
te.h" | 5 #include "components/navigation_interception/intercept_navigation_delegate.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 "content/components/navigation_interception/intercept_navigation_resour
ce_throttle.h" | 10 #include "components/navigation_interception/intercept_navigation_resource_throt
tle.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::PageTransition; |
21 using content::RenderViewHost; | 22 using content::RenderViewHost; |
22 using content::WebContents; | 23 using content::WebContents; |
23 | 24 |
24 namespace content { | 25 namespace components { |
25 | 26 |
26 namespace { | 27 namespace { |
27 | 28 |
28 const void* kInterceptNavigationDelegateUserDataKey = | 29 const void* kInterceptNavigationDelegateUserDataKey = |
29 &kInterceptNavigationDelegateUserDataKey; | 30 &kInterceptNavigationDelegateUserDataKey; |
30 | 31 |
31 bool CheckIfShouldIgnoreNavigationOnUIThread(RenderViewHost* source, | 32 bool CheckIfShouldIgnoreNavigationOnUIThread(RenderViewHost* source, |
32 const GURL& url, | 33 const GURL& url, |
33 const content::Referrer& referrer, | 34 const content::Referrer& referrer, |
34 bool is_post, | 35 bool is_post, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 has_user_gesture, | 106 has_user_gesture, |
106 transition_type); | 107 transition_type); |
107 } | 108 } |
108 | 109 |
109 // Register native methods. | 110 // Register native methods. |
110 | 111 |
111 bool RegisterInterceptNavigationDelegate(JNIEnv* env) { | 112 bool RegisterInterceptNavigationDelegate(JNIEnv* env) { |
112 return RegisterNativesImpl(env); | 113 return RegisterNativesImpl(env); |
113 } | 114 } |
114 | 115 |
115 } // namespace content | 116 } // namespace components |
OLD | NEW |