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

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

Issue 2063123002: media: Call SetMediaClientAndroid() in content for browser process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: media: Call SetMediaClientAndroid() in content for browser process Created 4 years, 6 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 | chrome/browser/chrome_browser_main_android.h » ('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_result_codes.h" 9 #include "android_webview/browser/aw_result_codes.h"
10 #include "android_webview/browser/deferred_gpu_command_service.h" 10 #include "android_webview/browser/deferred_gpu_command_service.h"
11 #include "android_webview/browser/net/aw_network_change_notifier_factory.h" 11 #include "android_webview/browser/net/aw_network_change_notifier_factory.h"
12 #include "android_webview/common/aw_media_client_android.h"
13 #include "android_webview/common/aw_resource.h" 12 #include "android_webview/common/aw_resource.h"
14 #include "android_webview/common/aw_switches.h" 13 #include "android_webview/common/aw_switches.h"
15 #include "base/android/apk_assets.h" 14 #include "base/android/apk_assets.h"
16 #include "base/android/build_info.h" 15 #include "base/android/build_info.h"
17 #include "base/android/locale_utils.h" 16 #include "base/android/locale_utils.h"
18 #include "base/android/memory_pressure_listener_android.h" 17 #include "base/android/memory_pressure_listener_android.h"
19 #include "base/command_line.h" 18 #include "base/command_line.h"
20 #include "base/files/file_path.h" 19 #include "base/files/file_path.h"
21 #include "base/i18n/rtl.h" 20 #include "base/i18n/rtl.h"
22 #include "base/path_service.h" 21 #include "base/path_service.h"
23 #include "components/crash/content/browser/crash_micro_dump_manager_android.h" 22 #include "components/crash/content/browser/crash_micro_dump_manager_android.h"
24 #include "content/public/browser/android/synchronous_compositor.h" 23 #include "content/public/browser/android/synchronous_compositor.h"
25 #include "content/public/browser/render_frame_host.h" 24 #include "content/public/browser/render_frame_host.h"
26 #include "content/public/browser/render_process_host.h" 25 #include "content/public/browser/render_process_host.h"
27 #include "content/public/common/content_client.h" 26 #include "content/public/common/content_client.h"
28 #include "content/public/common/content_switches.h" 27 #include "content/public/common/content_switches.h"
29 #include "content/public/common/result_codes.h" 28 #include "content/public/common/result_codes.h"
30 #include "media/base/android/media_client_android.h"
31 #include "net/android/network_change_notifier_factory_android.h" 29 #include "net/android/network_change_notifier_factory_android.h"
32 #include "net/base/network_change_notifier.h" 30 #include "net/base/network_change_notifier.h"
33 #include "ui/base/l10n/l10n_util.h" 31 #include "ui/base/l10n/l10n_util.h"
34 #include "ui/base/layout.h" 32 #include "ui/base/layout.h"
35 #include "ui/base/resource/resource_bundle.h" 33 #include "ui/base/resource/resource_bundle.h"
36 #include "ui/base/resource/resource_bundle_android.h" 34 #include "ui/base/resource/resource_bundle_android.h"
37 #include "ui/base/ui_base_paths.h" 35 #include "ui/base/ui_base_paths.h"
38 #include "ui/gl/gl_surface.h" 36 #include "ui/gl/gl_surface.h"
39 37
40 namespace android_webview { 38 namespace android_webview {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 83 }
86 84
87 return content::RESULT_CODE_NORMAL_EXIT; 85 return content::RESULT_CODE_NORMAL_EXIT;
88 } 86 }
89 87
90 void AwBrowserMainParts::PreMainMessageLoopRun() { 88 void AwBrowserMainParts::PreMainMessageLoopRun() {
91 browser_context_->PreMainMessageLoopRun(); 89 browser_context_->PreMainMessageLoopRun();
92 90
93 AwDevToolsDiscoveryProvider::Install(); 91 AwDevToolsDiscoveryProvider::Install();
94 92
95 media::SetMediaClientAndroid(
96 new AwMediaClientAndroid(AwResource::GetConfigKeySystemUuidMapping()));
97
98 content::RenderFrameHost::AllowInjectingJavaScriptForAndroidWebView(); 93 content::RenderFrameHost::AllowInjectingJavaScriptForAndroidWebView();
99 } 94 }
100 95
101 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) { 96 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) {
102 // Android WebView does not use default MessageLoop. It has its own 97 // Android WebView does not use default MessageLoop. It has its own
103 // Android specific MessageLoop. 98 // Android specific MessageLoop.
104 return true; 99 return true;
105 } 100 }
106 101
107 } // namespace android_webview 102 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698