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 "components/navigation_interception/intercept_navigation_delegate.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 "components/navigation_interception/intercept_navigation_resource_throt
tle.h" | 10 #include "components/navigation_interception/intercept_navigation_resource_throt
tle.h" |
11 #include "components/navigation_interception/navigation_params_android.h" | 11 #include "components/navigation_interception/navigation_params_android.h" |
12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
13 #include "content/public/browser/render_view_host.h" | 13 #include "content/public/browser/render_view_host.h" |
14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.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 #include "url/gurl.h" | 17 #include "url/gurl.h" |
18 | 18 |
19 using base::android::ConvertUTF8ToJavaString; | 19 using base::android::ConvertUTF8ToJavaString; |
20 using base::android::ScopedJavaLocalRef; | 20 using base::android::ScopedJavaLocalRef; |
21 using content::BrowserThread; | 21 using content::BrowserThread; |
22 using content::PageTransition; | 22 using ui::PageTransition; |
23 using content::RenderViewHost; | 23 using content::RenderViewHost; |
24 using content::WebContents; | 24 using content::WebContents; |
25 | 25 |
26 namespace navigation_interception { | 26 namespace navigation_interception { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 const void* kInterceptNavigationDelegateUserDataKey = | 30 const void* kInterceptNavigationDelegateUserDataKey = |
31 &kInterceptNavigationDelegateUserDataKey; | 31 &kInterceptNavigationDelegateUserDataKey; |
32 | 32 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 jobject_params.obj()); | 95 jobject_params.obj()); |
96 } | 96 } |
97 | 97 |
98 // Register native methods. | 98 // Register native methods. |
99 | 99 |
100 bool RegisterInterceptNavigationDelegate(JNIEnv* env) { | 100 bool RegisterInterceptNavigationDelegate(JNIEnv* env) { |
101 return RegisterNativesImpl(env); | 101 return RegisterNativesImpl(env); |
102 } | 102 } |
103 | 103 |
104 } // namespace navigation_interception | 104 } // namespace navigation_interception |
OLD | NEW |