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

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

Issue 835633003: Enable libc++ on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix AOSP Created 5 years, 10 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') | 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 24 matching lines...) Expand all
35 #include "base/android/jni_array.h" 35 #include "base/android/jni_array.h"
36 #include "base/android/jni_string.h" 36 #include "base/android/jni_string.h"
37 #include "base/android/locale_utils.h" 37 #include "base/android/locale_utils.h"
38 #include "base/android/scoped_java_ref.h" 38 #include "base/android/scoped_java_ref.h"
39 #include "base/atomicops.h" 39 #include "base/atomicops.h"
40 #include "base/bind.h" 40 #include "base/bind.h"
41 #include "base/callback.h" 41 #include "base/callback.h"
42 #include "base/memory/memory_pressure_listener.h" 42 #include "base/memory/memory_pressure_listener.h"
43 #include "base/message_loop/message_loop.h" 43 #include "base/message_loop/message_loop.h"
44 #include "base/pickle.h" 44 #include "base/pickle.h"
45 #include "base/stl_util.h"
45 #include "base/strings/string16.h" 46 #include "base/strings/string16.h"
46 #include "base/supports_user_data.h" 47 #include "base/supports_user_data.h"
47 #include "components/autofill/content/browser/content_autofill_driver_factory.h" 48 #include "components/autofill/content/browser/content_autofill_driver_factory.h"
48 #include "components/autofill/core/browser/autofill_manager.h" 49 #include "components/autofill/core/browser/autofill_manager.h"
49 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" 50 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
50 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h" 51 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_sett ings.h"
51 #include "components/navigation_interception/intercept_navigation_delegate.h" 52 #include "components/navigation_interception/intercept_navigation_delegate.h"
52 #include "content/public/browser/android/content_view_core.h" 53 #include "content/public/browser/android/content_view_core.h"
53 #include "content/public/browser/android/synchronous_compositor.h" 54 #include "content/public/browser/android/synchronous_compositor.h"
54 #include "content/public/browser/browser_thread.h" 55 #include "content/public/browser/browser_thread.h"
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 } 837 }
837 838
838 jboolean AwContents::RestoreFromOpaqueState( 839 jboolean AwContents::RestoreFromOpaqueState(
839 JNIEnv* env, jobject obj, jbyteArray state) { 840 JNIEnv* env, jobject obj, jbyteArray state) {
840 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 841 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
841 // TODO(boliu): This copy can be optimized out if this is a performance 842 // TODO(boliu): This copy can be optimized out if this is a performance
842 // problem. 843 // problem.
843 std::vector<uint8> state_vector; 844 std::vector<uint8> state_vector;
844 base::android::JavaByteArrayToByteVector(env, state, &state_vector); 845 base::android::JavaByteArrayToByteVector(env, state, &state_vector);
845 846
846 Pickle pickle(reinterpret_cast<const char*>(state_vector.begin()), 847 Pickle pickle(reinterpret_cast<const char*>(vector_as_array(&state_vector)),
847 state_vector.size()); 848 state_vector.size());
848 PickleIterator iterator(pickle); 849 PickleIterator iterator(pickle);
849 850
850 return RestoreFromPickle(&iterator, web_contents_.get()); 851 return RestoreFromPickle(&iterator, web_contents_.get());
851 } 852 }
852 853
853 bool AwContents::OnDraw(JNIEnv* env, 854 bool AwContents::OnDraw(JNIEnv* env,
854 jobject obj, 855 jobject obj,
855 jobject canvas, 856 jobject canvas,
856 jboolean is_hardware_accelerated, 857 jboolean is_hardware_accelerated,
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 1105
1105 AwMessagePortServiceImpl::GetInstance()->CreateMessageChannel(env, callback, 1106 AwMessagePortServiceImpl::GetInstance()->CreateMessageChannel(env, callback,
1106 GetMessagePortMessageFilter()); 1107 GetMessagePortMessageFilter());
1107 } 1108 }
1108 1109
1109 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { 1110 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) {
1110 g_should_download_favicons = true; 1111 g_should_download_favicons = true;
1111 } 1112 }
1112 1113
1113 } // namespace android_webview 1114 } // 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