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

Side by Side Diff: content/browser/android/content_view_statics.cc

Issue 10706004: Adds helper methods for WebView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: My repo was out of sync with the latest upstream tree Created 8 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include <jni.h>
6
7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h"
9 #include "base/android/scoped_java_ref.h"
10 #include "base/basictypes.h"
11 #include "base/logging.h"
12 #include "content/browser/android/content_view_statics.h"
13 #include "content/common/android/address_parser.h"
14 #include "jni/content_view_statics_jni.h"
15
16 using base::android::ConvertJavaStringToUTF16;
17 using base::android::ConvertUTF16ToJavaString;
18 using base::android::ScopedJavaLocalRef;
19 using namespace content::address_parser;
John Grabowski 2012/06/28 17:08:06 chrome style doesn't like "using namespace". List
aurimas (slooooooooow) 2012/06/28 23:00:07 Done.
20
21 static jstring FindAddress(JNIEnv* env, jclass clazz, jstring addr) {
John Grabowski 2012/06/28 17:08:06 chrome style prefers anon namespaces to static fun
aurimas (slooooooooow) 2012/06/28 23:00:07 I tried putting this function in a anon namespace,
22 string16 content_16 = ConvertJavaStringToUTF16(env, addr);
23 string16 result_16;
24 if (FindAddress(content_16, &result_16))
25 return ConvertUTF16ToJavaString(env, result_16).Release();
26 return NULL;
27 }
28
29 bool RegisterWebViewStatics(JNIEnv* env) {
John Grabowski 2012/06/28 17:08:06 all in content napespace
aurimas (slooooooooow) 2012/06/28 23:00:07 Done.
30 return RegisterNativesImpl(env) >= 0;
31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698