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

Side by Side Diff: components/web_contents_delegate_android/web_contents_delegate_android.cc

Issue 23835020: Android: cleanup jni_android to minimize external dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 #include "components/web_contents_delegate_android/web_contents_delegate_android .h" 5 #include "components/web_contents_delegate_android/web_contents_delegate_android .h"
6 6
7 #include <android/keycodes.h> 7 #include <android/keycodes.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
11 #include "base/android/jni_string.h" 11 #include "base/android/jni_string.h"
12 #include "components/web_contents_delegate_android/color_chooser_android.h" 12 #include "components/web_contents_delegate_android/color_chooser_android.h"
13 #include "content/public/browser/android/content_view_core.h" 13 #include "content/public/browser/android/content_view_core.h"
14 #include "content/public/browser/color_chooser.h" 14 #include "content/public/browser/color_chooser.h"
15 #include "content/public/browser/invalidate_type.h" 15 #include "content/public/browser/invalidate_type.h"
16 #include "content/public/browser/native_web_keyboard_event.h" 16 #include "content/public/browser/native_web_keyboard_event.h"
17 #include "content/public/browser/page_navigator.h" 17 #include "content/public/browser/page_navigator.h"
18 #include "content/public/browser/render_widget_host_view.h" 18 #include "content/public/browser/render_widget_host_view.h"
19 #include "content/public/browser/web_contents.h" 19 #include "content/public/browser/web_contents.h"
20 #include "content/public/common/page_transition_types.h" 20 #include "content/public/common/page_transition_types.h"
21 #include "content/public/common/referrer.h" 21 #include "content/public/common/referrer.h"
22 #include "jni/WebContentsDelegateAndroid_jni.h" 22 #include "jni/WebContentsDelegateAndroid_jni.h"
23 #include "ui/base/window_open_disposition.h" 23 #include "ui/base/window_open_disposition.h"
24 #include "ui/gfx/rect.h" 24 #include "ui/gfx/rect.h"
25 #include "url/gurl.h" 25 #include "url/gurl.h"
26 26
27 using base::android::AttachCurrentThread; 27 using base::android::AttachCurrentThread;
28 using base::android::ConvertUTF8ToJavaString; 28 using base::android::ConvertUTF8ToJavaString;
29 using base::android::ConvertUTF16ToJavaString; 29 using base::android::ConvertUTF16ToJavaString;
30 using base::android::HasClass;
31 using base::android::ScopedJavaLocalRef; 30 using base::android::ScopedJavaLocalRef;
32 using content::ColorChooser; 31 using content::ColorChooser;
33 using content::WebContents; 32 using content::WebContents;
34 using content::WebContentsDelegate; 33 using content::WebContentsDelegate;
35 34
36 namespace web_contents_delegate_android { 35 namespace web_contents_delegate_android {
37 36
38 WebContentsDelegateAndroid::WebContentsDelegateAndroid(JNIEnv* env, jobject obj) 37 WebContentsDelegateAndroid::WebContentsDelegateAndroid(JNIEnv* env, jobject obj)
39 : weak_java_delegate_(env, obj) { 38 : weak_java_delegate_(env, obj) {
40 } 39 }
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 env, obj.obj(), scroll_point.x(), scroll_point.y()); 319 env, obj.obj(), scroll_point.x(), scroll_point.y());
321 } 320 }
322 321
323 // ---------------------------------------------------------------------------- 322 // ----------------------------------------------------------------------------
324 // Native JNI methods 323 // Native JNI methods
325 // ---------------------------------------------------------------------------- 324 // ----------------------------------------------------------------------------
326 325
327 // Register native methods 326 // Register native methods
328 327
329 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) { 328 bool RegisterWebContentsDelegateAndroid(JNIEnv* env) {
330 if (!HasClass(env, kWebContentsDelegateAndroidClassPath)) {
331 DLOG(ERROR) << "Unable to find class WebContentsDelegateAndroid!";
332 return false;
333 }
334 return RegisterNativesImpl(env); 329 return RegisterNativesImpl(env);
335 } 330 }
336 331
337 } // namespace web_contents_delegate_android 332 } // namespace web_contents_delegate_android
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698