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

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: Review comments 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') | net/base/address_tracker_linux_unittest.cc » ('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 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 } 825 }
826 826
827 jboolean AwContents::RestoreFromOpaqueState( 827 jboolean AwContents::RestoreFromOpaqueState(
828 JNIEnv* env, jobject obj, jbyteArray state) { 828 JNIEnv* env, jobject obj, jbyteArray state) {
829 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 829 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
830 // TODO(boliu): This copy can be optimized out if this is a performance 830 // TODO(boliu): This copy can be optimized out if this is a performance
831 // problem. 831 // problem.
832 std::vector<uint8> state_vector; 832 std::vector<uint8> state_vector;
833 base::android::JavaByteArrayToByteVector(env, state, &state_vector); 833 base::android::JavaByteArrayToByteVector(env, state, &state_vector);
834 834
835 Pickle pickle(reinterpret_cast<const char*>(state_vector.begin()), 835 Pickle pickle(reinterpret_cast<const char*>(state_vector.data()),
836 state_vector.size()); 836 state_vector.size());
837 PickleIterator iterator(pickle); 837 PickleIterator iterator(pickle);
838 838
839 return RestoreFromPickle(&iterator, web_contents_.get()); 839 return RestoreFromPickle(&iterator, web_contents_.get());
840 } 840 }
841 841
842 bool AwContents::OnDraw(JNIEnv* env, 842 bool AwContents::OnDraw(JNIEnv* env,
843 jobject obj, 843 jobject obj,
844 jobject canvas, 844 jobject canvas,
845 jboolean is_hardware_accelerated, 845 jboolean is_hardware_accelerated,
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 jboolean visible) { 1048 jboolean visible) {
1049 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1049 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1050 browser_view_renderer_.TrimMemory(level, visible); 1050 browser_view_renderer_.TrimMemory(level, visible);
1051 } 1051 }
1052 1052
1053 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { 1053 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) {
1054 g_should_download_favicons = true; 1054 g_should_download_favicons = true;
1055 } 1055 }
1056 1056
1057 } // namespace android_webview 1057 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | base/android/jni_array.cc » ('j') | net/base/address_tracker_linux_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698