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

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

Issue 19052004: Create ContentUtilityClient in single-process mode. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 "content/public/app/content_main_runner.h" 5 #include "content/public/app/content_main_runner.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/allocator/allocator_extension.h" 9 #include "base/allocator/allocator_extension.h"
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 if (!content_client->plugin_) 300 if (!content_client->plugin_)
301 content_client->plugin_ = &g_empty_content_plugin_client.Get(); 301 content_client->plugin_ = &g_empty_content_plugin_client.Get();
302 // Single process not supported in split dll mode. 302 // Single process not supported in split dll mode.
303 } else if (process_type == switches::kRendererProcess || 303 } else if (process_type == switches::kRendererProcess ||
304 CommandLine::ForCurrentProcess()->HasSwitch( 304 CommandLine::ForCurrentProcess()->HasSwitch(
305 switches::kSingleProcess)) { 305 switches::kSingleProcess)) {
306 if (delegate) 306 if (delegate)
307 content_client->renderer_ = delegate->CreateContentRendererClient(); 307 content_client->renderer_ = delegate->CreateContentRendererClient();
308 if (!content_client->renderer_) 308 if (!content_client->renderer_)
309 content_client->renderer_ = &g_empty_content_renderer_client.Get(); 309 content_client->renderer_ = &g_empty_content_renderer_client.Get();
310 } else if (process_type == switches::kUtilityProcess) { 310 }
311
312 if (process_type == switches::kUtilityProcess ||
313 CommandLine::ForCurrentProcess()->HasSwitch(
314 switches::kSingleProcess)) {
311 if (delegate) 315 if (delegate)
312 content_client->utility_ = delegate->CreateContentUtilityClient(); 316 content_client->utility_ = delegate->CreateContentUtilityClient();
313 // TODO(scottmg): http://crbug.com/237249 Should be in _child. 317 // TODO(scottmg): http://crbug.com/237249 Should be in _child.
314 if (!content_client->utility_) 318 if (!content_client->utility_)
315 content_client->utility_ = &g_empty_content_utility_client.Get(); 319 content_client->utility_ = &g_empty_content_utility_client.Get();
316 } 320 }
317 #endif // !OS_IOS 321 #endif // !OS_IOS
318 } 322 }
319 }; 323 };
320 324
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 816
813 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); 817 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl);
814 }; 818 };
815 819
816 // static 820 // static
817 ContentMainRunner* ContentMainRunner::Create() { 821 ContentMainRunner* ContentMainRunner::Create() {
818 return new ContentMainRunnerImpl(); 822 return new ContentMainRunnerImpl();
819 } 823 }
820 824
821 } // namespace content 825 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698