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

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: Remove more unused stuff Created 5 years, 11 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
« no previous file with comments | « no previous file | base/android/jni_array.cc » ('j') | no next file with comments »
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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 } 848 }
849 849
850 jboolean AwContents::RestoreFromOpaqueState( 850 jboolean AwContents::RestoreFromOpaqueState(
851 JNIEnv* env, jobject obj, jbyteArray state) { 851 JNIEnv* env, jobject obj, jbyteArray state) {
852 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 852 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
853 // TODO(boliu): This copy can be optimized out if this is a performance 853 // TODO(boliu): This copy can be optimized out if this is a performance
854 // problem. 854 // problem.
855 std::vector<uint8> state_vector; 855 std::vector<uint8> state_vector;
856 base::android::JavaByteArrayToByteVector(env, state, &state_vector); 856 base::android::JavaByteArrayToByteVector(env, state, &state_vector);
857 857
858 Pickle pickle(reinterpret_cast<const char*>(state_vector.begin()), 858 Pickle pickle(reinterpret_cast<const char*>(state_vector.data()),
859 state_vector.size()); 859 state_vector.size());
860 PickleIterator iterator(pickle); 860 PickleIterator iterator(pickle);
861 861
862 return RestoreFromPickle(&iterator, web_contents_.get()); 862 return RestoreFromPickle(&iterator, web_contents_.get());
863 } 863 }
864 864
865 bool AwContents::OnDraw(JNIEnv* env, 865 bool AwContents::OnDraw(JNIEnv* env,
866 jobject obj, 866 jobject obj,
867 jobject canvas, 867 jobject canvas,
868 jboolean is_hardware_accelerated, 868 jboolean is_hardware_accelerated,
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 base::Owned(port1), 1125 base::Owned(port1),
1126 base::Owned(port2))); 1126 base::Owned(port2)));
1127 } 1127 }
1128 1128
1129 1129
1130 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { 1130 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) {
1131 g_should_download_favicons = true; 1131 g_should_download_favicons = true;
1132 } 1132 }
1133 1133
1134 } // namespace android_webview 1134 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | base/android/jni_array.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698