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

Side by Side Diff: sky/shell/shell.cc

Issue 1230113006: Remove last use of Platform::networkService() (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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 | « sky/engine/public/platform/Platform.h ('k') | sky/shell/ui/engine.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "sky/shell/shell.h" 5 #include "sky/shell/shell.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "mojo/common/message_pump_mojo.h" 9 #include "mojo/common/message_pump_mojo.h"
10 #include "mojo/edk/embedder/embedder.h" 10 #include "mojo/edk/embedder/embedder.h"
(...skipping 20 matching lines...) Expand all
31 31
32 base::Thread::Options options; 32 base::Thread::Options options;
33 options.message_pump_factory = base::Bind(&CreateMessagePumpMojo); 33 options.message_pump_factory = base::Bind(&CreateMessagePumpMojo);
34 34
35 gpu_thread_.reset(new base::Thread("gpu_thread")); 35 gpu_thread_.reset(new base::Thread("gpu_thread"));
36 gpu_thread_->StartWithOptions(options); 36 gpu_thread_->StartWithOptions(options);
37 37
38 ui_thread_.reset(new base::Thread("ui_thread")); 38 ui_thread_.reset(new base::Thread("ui_thread"));
39 ui_thread_->StartWithOptions(options); 39 ui_thread_->StartWithOptions(options);
40 40
41 ui_task_runner()->PostTask( 41 ui_task_runner()->PostTask(FROM_HERE, base::Bind(&Engine::Init));
42 FROM_HERE, base::Bind(&Engine::Init, service_provider_context_.get()));
43 } 42 }
44 43
45 Shell::~Shell() { 44 Shell::~Shell() {
46 } 45 }
47 46
48 void Shell::Init(scoped_ptr<ServiceProviderContext> service_provider_context) { 47 void Shell::Init(scoped_ptr<ServiceProviderContext> service_provider_context) {
49 g_shell = new Shell(service_provider_context.Pass()); 48 g_shell = new Shell(service_provider_context.Pass());
50 } 49 }
51 50
52 Shell& Shell::Shared() { 51 Shell& Shell::Shared() {
53 DCHECK(g_shell); 52 DCHECK(g_shell);
54 return *g_shell; 53 return *g_shell;
55 } 54 }
56 55
57 } // namespace shell 56 } // namespace shell
58 } // namespace sky 57 } // namespace sky
OLDNEW
« no previous file with comments | « sky/engine/public/platform/Platform.h ('k') | sky/shell/ui/engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698