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

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

Issue 121033002: Update uses of UTF conversions in content/ to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser/android/content_view_core_impl.h" 5 #include "content/browser/android/content_view_core_impl.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 content_offset.y(), 420 content_offset.y(),
421 overdraw_bottom_height); 421 overdraw_bottom_height);
422 } 422 }
423 423
424 void ContentViewCoreImpl::SetTitle(const base::string16& title) { 424 void ContentViewCoreImpl::SetTitle(const base::string16& title) {
425 JNIEnv* env = AttachCurrentThread(); 425 JNIEnv* env = AttachCurrentThread();
426 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 426 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
427 if (obj.is_null()) 427 if (obj.is_null())
428 return; 428 return;
429 ScopedJavaLocalRef<jstring> jtitle = 429 ScopedJavaLocalRef<jstring> jtitle =
430 ConvertUTF8ToJavaString(env, UTF16ToUTF8(title)); 430 ConvertUTF8ToJavaString(env, base::UTF16ToUTF8(title));
431 Java_ContentViewCore_setTitle(env, obj.obj(), jtitle.obj()); 431 Java_ContentViewCore_setTitle(env, obj.obj(), jtitle.obj());
432 } 432 }
433 433
434 void ContentViewCoreImpl::OnBackgroundColorChanged(SkColor color) { 434 void ContentViewCoreImpl::OnBackgroundColorChanged(SkColor color) {
435 JNIEnv* env = AttachCurrentThread(); 435 JNIEnv* env = AttachCurrentThread();
436 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 436 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
437 if (obj.is_null()) 437 if (obj.is_null())
438 return; 438 return;
439 Java_ContentViewCore_onBackgroundColorChanged(env, obj.obj(), color); 439 Java_ContentViewCore_onBackgroundColorChanged(env, obj.obj(), color);
440 } 440 }
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 reinterpret_cast<ui::ViewAndroid*>(view_android), 1637 reinterpret_cast<ui::ViewAndroid*>(view_android),
1638 reinterpret_cast<ui::WindowAndroid*>(window_android)); 1638 reinterpret_cast<ui::WindowAndroid*>(window_android));
1639 return reinterpret_cast<intptr_t>(view); 1639 return reinterpret_cast<intptr_t>(view);
1640 } 1640 }
1641 1641
1642 bool RegisterContentViewCore(JNIEnv* env) { 1642 bool RegisterContentViewCore(JNIEnv* env) {
1643 return RegisterNativesImpl(env); 1643 return RegisterNativesImpl(env);
1644 } 1644 }
1645 1645
1646 } // namespace content 1646 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698