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

Side by Side Diff: android_webview/native/aw_contents.cc

Issue 691783003: [WIP NOT FOR COMMIT] Switch Android to libc++ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 6 years, 1 month 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
« no previous file with comments | « no previous file | base/android/jni_array.cc » ('j') | base/compiler_specific.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "android_webview/native/aw_contents.h" 5 #include "android_webview/native/aw_contents.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "android_webview/browser/aw_browser_context.h" 9 #include "android_webview/browser/aw_browser_context.h"
10 #include "android_webview/browser/aw_browser_main_parts.h" 10 #include "android_webview/browser/aw_browser_main_parts.h"
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 } 951 }
952 952
953 jboolean AwContents::RestoreFromOpaqueState( 953 jboolean AwContents::RestoreFromOpaqueState(
954 JNIEnv* env, jobject obj, jbyteArray state) { 954 JNIEnv* env, jobject obj, jbyteArray state) {
955 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 955 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
956 // TODO(boliu): This copy can be optimized out if this is a performance 956 // TODO(boliu): This copy can be optimized out if this is a performance
957 // problem. 957 // problem.
958 std::vector<uint8> state_vector; 958 std::vector<uint8> state_vector;
959 base::android::JavaByteArrayToByteVector(env, state, &state_vector); 959 base::android::JavaByteArrayToByteVector(env, state, &state_vector);
960 960
961 Pickle pickle(reinterpret_cast<const char*>(state_vector.begin()), 961 Pickle pickle(reinterpret_cast<const char*>(state_vector.data()),
962 state_vector.size()); 962 state_vector.size());
963 PickleIterator iterator(pickle); 963 PickleIterator iterator(pickle);
964 964
965 return RestoreFromPickle(&iterator, web_contents_.get()); 965 return RestoreFromPickle(&iterator, web_contents_.get());
966 } 966 }
967 967
968 bool AwContents::OnDraw(JNIEnv* env, 968 bool AwContents::OnDraw(JNIEnv* env,
969 jobject obj, 969 jobject obj,
970 jobject canvas, 970 jobject canvas,
971 jboolean is_hardware_accelerated, 971 jboolean is_hardware_accelerated,
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 } 1169 }
1170 1170
1171 browser_view_renderer_.TrimMemory(level, visible); 1171 browser_view_renderer_.TrimMemory(level, visible);
1172 } 1172 }
1173 1173
1174 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { 1174 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) {
1175 g_should_download_favicons = true; 1175 g_should_download_favicons = true;
1176 } 1176 }
1177 1177
1178 } // namespace android_webview 1178 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | base/android/jni_array.cc » ('j') | base/compiler_specific.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698