Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "chrome/browser/chrome_browser_main_android.h" | 5 #include "chrome/browser/chrome_browser_main_android.h" |
| 6 | 6 |
| 7 #include "base/android/build_info.h" | 7 #include "base/android/build_info.h" |
| 8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
| 12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 13 #include "base/trace_event/trace_event.h" | 13 #include "base/trace_event/trace_event.h" |
| 14 #include "chrome/browser/android/chrome_media_client_android.h" | 14 #include "chrome/browser/android/chrome_media_client_android.h" |
| 15 #include "chrome/browser/android/seccomp_support_detector.h" | 15 #include "chrome/browser/android/seccomp_support_detector.h" |
| 16 #include "chrome/browser/media/android/provision/url_provision_fetcher.h" | |
| 16 #include "chrome/browser/signin/signin_manager_factory.h" | 17 #include "chrome/browser/signin/signin_manager_factory.h" |
| 17 #include "chrome/common/chrome_paths.h" | 18 #include "chrome/common/chrome_paths.h" |
| 18 #include "components/crash/content/app/breakpad_linux.h" | 19 #include "components/crash/content/app/breakpad_linux.h" |
| 19 #include "components/crash/content/browser/crash_dump_manager_android.h" | 20 #include "components/crash/content/browser/crash_dump_manager_android.h" |
| 20 #include "components/enhanced_bookmarks/persistent_image_store.h" | 21 #include "components/enhanced_bookmarks/persistent_image_store.h" |
| 21 #include "components/signin/core/browser/signin_manager.h" | 22 #include "components/signin/core/browser/signin_manager.h" |
| 22 #include "content/public/browser/android/compositor.h" | 23 #include "content/public/browser/android/compositor.h" |
| 23 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
| 24 #include "content/public/common/main_function_params.h" | 25 #include "content/public/common/main_function_params.h" |
| 25 #include "media/base/android/media_client_android.h" | 26 #include "media/base/android/media_client_android.h" |
| 27 #include "media/base/android/provision_fetcher.h" | |
| 26 #include "net/android/network_change_notifier_factory_android.h" | 28 #include "net/android/network_change_notifier_factory_android.h" |
| 27 #include "net/base/network_change_notifier.h" | 29 #include "net/base/network_change_notifier.h" |
| 28 #include "ui/base/resource/resource_bundle_android.h" | 30 #include "ui/base/resource/resource_bundle_android.h" |
| 29 #include "ui/base/ui_base_paths.h" | 31 #include "ui/base/ui_base_paths.h" |
| 30 | 32 |
| 31 namespace { | 33 namespace { |
| 32 | 34 |
| 33 void DeleteFileTask( | 35 void DeleteFileTask( |
| 34 const base::FilePath& file_path) { | 36 const base::FilePath& file_path) { |
| 35 if (base::PathExists(file_path)) | 37 if (base::PathExists(file_path)) |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 { | 119 { |
| 118 TRACE_EVENT0("startup", | 120 TRACE_EVENT0("startup", |
| 119 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization:StartUiMsgLoop"); | 121 "ChromeBrowserMainPartsAndroid::PreEarlyInitialization:StartUiMsgLoop"); |
| 120 base::MessageLoopForUI::current()->Start(); | 122 base::MessageLoopForUI::current()->Start(); |
| 121 } | 123 } |
| 122 | 124 |
| 123 ChromeBrowserMainParts::PreEarlyInitialization(); | 125 ChromeBrowserMainParts::PreEarlyInitialization(); |
| 124 } | 126 } |
| 125 | 127 |
| 126 void ChromeBrowserMainPartsAndroid::PreMainMessageLoopRun() { | 128 void ChromeBrowserMainPartsAndroid::PreMainMessageLoopRun() { |
| 129 media::ProvisionFetcher::SetFactory(new media::URLProvisionFetcherFactory); | |
| 127 media::SetMediaClientAndroid(new ChromeMediaClientAndroid); | 130 media::SetMediaClientAndroid(new ChromeMediaClientAndroid); |
|
xhwang
2015/11/02 20:37:04
Wondering whether we can merge these two by puttin
Tima Vaisburd
2015/11/05 02:24:06
MediaClientAndroid now has the method CreateDefaul
| |
| 128 | 131 |
| 129 ChromeBrowserMainParts::PreMainMessageLoopRun(); | 132 ChromeBrowserMainParts::PreMainMessageLoopRun(); |
| 130 } | 133 } |
| 131 | 134 |
| 132 void ChromeBrowserMainPartsAndroid::PostBrowserStart() { | 135 void ChromeBrowserMainPartsAndroid::PostBrowserStart() { |
| 133 ChromeBrowserMainParts::PostBrowserStart(); | 136 ChromeBrowserMainParts::PostBrowserStart(); |
| 134 | 137 |
| 135 content::BrowserThread::GetBlockingPool()->PostDelayedTask(FROM_HERE, | 138 content::BrowserThread::GetBlockingPool()->PostDelayedTask(FROM_HERE, |
| 136 base::Bind(&SeccompSupportDetector::StartDetection), | 139 base::Bind(&SeccompSupportDetector::StartDetection), |
| 137 base::TimeDelta::FromMinutes(1)); | 140 base::TimeDelta::FromMinutes(1)); |
| 138 } | 141 } |
| 139 | 142 |
| 140 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { | 143 void ChromeBrowserMainPartsAndroid::ShowMissingLocaleMessageBox() { |
| 141 NOTREACHED(); | 144 NOTREACHED(); |
| 142 } | 145 } |
| OLD | NEW |