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

Side by Side Diff: content/app/content_main_runner.cc

Issue 1622743005: Introduce background Download process to android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gn build Created 4 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
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 "content/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <string> 10 #include <string>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 extern int GpuMain(const content::MainFunctionParams&); 114 extern int GpuMain(const content::MainFunctionParams&);
115 #if defined(ENABLE_PLUGINS) 115 #if defined(ENABLE_PLUGINS)
116 #if !defined(OS_LINUX) 116 #if !defined(OS_LINUX)
117 extern int PluginMain(const content::MainFunctionParams&); 117 extern int PluginMain(const content::MainFunctionParams&);
118 #endif 118 #endif
119 extern int PpapiPluginMain(const MainFunctionParams&); 119 extern int PpapiPluginMain(const MainFunctionParams&);
120 extern int PpapiBrokerMain(const MainFunctionParams&); 120 extern int PpapiBrokerMain(const MainFunctionParams&);
121 #endif 121 #endif
122 extern int RendererMain(const content::MainFunctionParams&); 122 extern int RendererMain(const content::MainFunctionParams&);
123 extern int UtilityMain(const MainFunctionParams&); 123 extern int UtilityMain(const MainFunctionParams&);
124 #if defined(OS_ANDROID)
125 extern int DownloadMain(const MainFunctionParams&);
126 #endif
124 } // namespace content 127 } // namespace content
125 128
126 namespace content { 129 namespace content {
127 130
128 #if !defined(CHROME_MULTIPLE_DLL_CHILD) 131 #if !defined(CHROME_MULTIPLE_DLL_CHILD)
129 base::LazyInstance<ContentBrowserClient> 132 base::LazyInstance<ContentBrowserClient>
130 g_empty_content_browser_client = LAZY_INSTANCE_INITIALIZER; 133 g_empty_content_browser_client = LAZY_INSTANCE_INITIALIZER;
131 #endif // !CHROME_MULTIPLE_DLL_CHILD 134 #endif // !CHROME_MULTIPLE_DLL_CHILD
132 135
133 #if !defined(OS_IOS) && !defined(CHROME_MULTIPLE_DLL_BROWSER) 136 #if !defined(OS_IOS) && !defined(CHROME_MULTIPLE_DLL_BROWSER)
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 #if defined(ENABLE_PLUGINS) 339 #if defined(ENABLE_PLUGINS)
337 #if !defined(OS_LINUX) 340 #if !defined(OS_LINUX)
338 { switches::kPluginProcess, PluginMain }, 341 { switches::kPluginProcess, PluginMain },
339 #endif 342 #endif
340 { switches::kPpapiPluginProcess, PpapiPluginMain }, 343 { switches::kPpapiPluginProcess, PpapiPluginMain },
341 { switches::kPpapiBrokerProcess, PpapiBrokerMain }, 344 { switches::kPpapiBrokerProcess, PpapiBrokerMain },
342 #endif // ENABLE_PLUGINS 345 #endif // ENABLE_PLUGINS
343 { switches::kUtilityProcess, UtilityMain }, 346 { switches::kUtilityProcess, UtilityMain },
344 { switches::kRendererProcess, RendererMain }, 347 { switches::kRendererProcess, RendererMain },
345 { switches::kGpuProcess, GpuMain }, 348 { switches::kGpuProcess, GpuMain },
349 #if defined(OS_ANDROID)
350 { switches::kDownloadProcess, DownloadMain},
351 #endif
346 #endif // !CHROME_MULTIPLE_DLL_BROWSER 352 #endif // !CHROME_MULTIPLE_DLL_BROWSER
347 }; 353 };
348 354
349 RegisterMainThreadFactories(); 355 RegisterMainThreadFactories();
350 356
351 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) { 357 for (size_t i = 0; i < arraysize(kMainFunctions); ++i) {
352 if (process_type == kMainFunctions[i].name) { 358 if (process_type == kMainFunctions[i].name) {
353 if (delegate) { 359 if (delegate) {
354 int exit_code = delegate->RunProcess(process_type, 360 int exit_code = delegate->RunProcess(process_type,
355 main_function_params); 361 main_function_params);
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 801
796 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 802 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
797 }; 803 };
798 804
799 // static 805 // static
800 ContentMainRunner* ContentMainRunner::Create() { 806 ContentMainRunner* ContentMainRunner::Create() {
801 return new ContentMainRunnerImpl(); 807 return new ContentMainRunnerImpl();
802 } 808 }
803 809
804 } // namespace content 810 } // namespace content
OLDNEW
« no previous file with comments | « content/app/android/download_main.cc ('k') | content/browser/android/child_process_launcher_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698