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

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

Issue 951983002: Reland "Enable libc++ on Android" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix clang+mesa Created 5 years, 7 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 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 } 843 }
844 844
845 jboolean AwContents::RestoreFromOpaqueState( 845 jboolean AwContents::RestoreFromOpaqueState(
846 JNIEnv* env, jobject obj, jbyteArray state) { 846 JNIEnv* env, jobject obj, jbyteArray state) {
847 DCHECK_CURRENTLY_ON(BrowserThread::UI); 847 DCHECK_CURRENTLY_ON(BrowserThread::UI);
848 // TODO(boliu): This copy can be optimized out if this is a performance 848 // TODO(boliu): This copy can be optimized out if this is a performance
849 // problem. 849 // problem.
850 std::vector<uint8> state_vector; 850 std::vector<uint8> state_vector;
851 base::android::JavaByteArrayToByteVector(env, state, &state_vector); 851 base::android::JavaByteArrayToByteVector(env, state, &state_vector);
852 852
853 Pickle pickle(reinterpret_cast<const char*>(state_vector.begin()), 853 Pickle pickle(reinterpret_cast<const char*>(state_vector.data()),
854 state_vector.size()); 854 state_vector.size());
855 PickleIterator iterator(pickle); 855 PickleIterator iterator(pickle);
856 856
857 return RestoreFromPickle(&iterator, web_contents_.get()); 857 return RestoreFromPickle(&iterator, web_contents_.get());
858 } 858 }
859 859
860 bool AwContents::OnDraw(JNIEnv* env, 860 bool AwContents::OnDraw(JNIEnv* env,
861 jobject obj, 861 jobject obj,
862 jobject canvas, 862 jobject canvas,
863 jboolean is_hardware_accelerated, 863 jboolean is_hardware_accelerated,
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 1149
1150 AwMessagePortServiceImpl::GetInstance()->CreateMessageChannel(env, ports, 1150 AwMessagePortServiceImpl::GetInstance()->CreateMessageChannel(env, ports,
1151 GetMessagePortMessageFilter()); 1151 GetMessagePortMessageFilter());
1152 } 1152 }
1153 1153
1154 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { 1154 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) {
1155 g_should_download_favicons = true; 1155 g_should_download_favicons = true;
1156 } 1156 }
1157 1157
1158 } // namespace android_webview 1158 } // 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