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

Side by Side Diff: android_webview/browser/aw_browser_main_parts.cc

Issue 1123783002: Add ExecuteJavaScriptForTest and make all tests use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 | android_webview/java/src/org/chromium/android_webview/AwContents.java » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/browser/aw_browser_main_parts.h" 5 #include "android_webview/browser/aw_browser_main_parts.h"
6 6
7 #include "android_webview/browser/aw_browser_context.h" 7 #include "android_webview/browser/aw_browser_context.h"
8 #include "android_webview/browser/aw_dev_tools_discovery_provider.h" 8 #include "android_webview/browser/aw_dev_tools_discovery_provider.h"
9 #include "android_webview/browser/aw_media_client_android.h" 9 #include "android_webview/browser/aw_media_client_android.h"
10 #include "android_webview/browser/aw_result_codes.h" 10 #include "android_webview/browser/aw_result_codes.h"
11 #include "android_webview/browser/deferred_gpu_command_service.h" 11 #include "android_webview/browser/deferred_gpu_command_service.h"
12 #include "android_webview/common/aw_resource.h" 12 #include "android_webview/common/aw_resource.h"
13 #include "android_webview/common/aw_switches.h" 13 #include "android_webview/common/aw_switches.h"
14 #include "base/android/apk_assets.h" 14 #include "base/android/apk_assets.h"
15 #include "base/android/build_info.h" 15 #include "base/android/build_info.h"
16 #include "base/android/locale_utils.h" 16 #include "base/android/locale_utils.h"
17 #include "base/android/memory_pressure_listener_android.h" 17 #include "base/android/memory_pressure_listener_android.h"
18 #include "base/command_line.h" 18 #include "base/command_line.h"
19 #include "base/files/file_path.h" 19 #include "base/files/file_path.h"
20 #include "base/path_service.h" 20 #include "base/path_service.h"
21 #include "content/public/browser/android/synchronous_compositor.h" 21 #include "content/public/browser/android/synchronous_compositor.h"
22 #include "content/public/browser/render_frame_host.h"
22 #include "content/public/browser/render_process_host.h" 23 #include "content/public/browser/render_process_host.h"
23 #include "content/public/common/content_client.h" 24 #include "content/public/common/content_client.h"
24 #include "content/public/common/content_switches.h" 25 #include "content/public/common/content_switches.h"
25 #include "content/public/common/result_codes.h" 26 #include "content/public/common/result_codes.h"
26 #include "content/public/common/url_utils.h" 27 #include "content/public/common/url_utils.h"
27 #include "media/base/android/media_client_android.h" 28 #include "media/base/android/media_client_android.h"
28 #include "net/android/network_change_notifier_factory_android.h" 29 #include "net/android/network_change_notifier_factory_android.h"
29 #include "net/base/network_change_notifier.h" 30 #include "net/base/network_change_notifier.h"
30 #include "ui/base/l10n/l10n_util.h" 31 #include "ui/base/l10n/l10n_util.h"
31 #include "ui/base/layout.h" 32 #include "ui/base/layout.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 media::SetMediaClientAndroid( 112 media::SetMediaClientAndroid(
112 new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping())); 113 new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping()));
113 114
114 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 115 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
115 switches::kUseIpcCommandBuffer)) { 116 switches::kUseIpcCommandBuffer)) {
116 content::SynchronousCompositor::SetUseIpcCommandBuffer(); 117 content::SynchronousCompositor::SetUseIpcCommandBuffer();
117 } else { 118 } else {
118 gfx::GLSurface::InitializeOneOff(); 119 gfx::GLSurface::InitializeOneOff();
119 } 120 }
120 121
122 content::RenderFrameHost::AllowInjectingJavaScriptForAndroidWebView();
123
121 // This is needed for WebView Classic backwards compatibility 124 // This is needed for WebView Classic backwards compatibility
122 // See crbug.com/298495 125 // See crbug.com/298495
123 content::SetMaxURLChars(20 * 1024 * 1024); 126 content::SetMaxURLChars(20 * 1024 * 1024);
124 } 127 }
125 128
126 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { 129 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) {
127 // Android WebView does not use default MessageLoop. It has its own 130 // Android WebView does not use default MessageLoop. It has its own
128 // Android specific MessageLoop. 131 // Android specific MessageLoop.
129 return true; 132 return true;
130 } 133 }
131 134
132 } // namespace android_webview 135 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | android_webview/java/src/org/chromium/android_webview/AwContents.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698