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

Side by Side Diff: shell/app_child_process.cc

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "shell/app_child_process.h" 5 #include "shell/app_child_process.h"
6 6
7 #include <unistd.h> 7 #include <unistd.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 // AppContext ------------------------------------------------------------------ 78 // AppContext ------------------------------------------------------------------
79 79
80 class AppChildControllerImpl; 80 class AppChildControllerImpl;
81 81
82 // Should be created and initialized on the main thread. 82 // Should be created and initialized on the main thread.
83 class AppContext : public embedder::ProcessDelegate { 83 class AppContext : public embedder::ProcessDelegate {
84 public: 84 public:
85 AppContext() 85 AppContext()
86 : io_thread_("io_thread"), controller_thread_("controller_thread") {} 86 : io_thread_("io_thread"), controller_thread_("controller_thread") {}
87 ~AppContext() {} 87 ~AppContext() override {}
88 88
89 void Init() { 89 void Init() {
90 // Initialize Mojo before starting any threads. 90 // Initialize Mojo before starting any threads.
91 embedder::Init(make_scoped_ptr(new embedder::SimplePlatformSupport())); 91 embedder::Init(make_scoped_ptr(new embedder::SimplePlatformSupport()));
92 92
93 // Create and start our I/O thread. 93 // Create and start our I/O thread.
94 base::Thread::Options io_thread_options(base::MessageLoop::TYPE_IO, 0); 94 base::Thread::Options io_thread_options(base::MessageLoop::TYPE_IO, 0);
95 CHECK(io_thread_.StartWithOptions(io_thread_options)); 95 CHECK(io_thread_.StartWithOptions(io_thread_options));
96 io_runner_ = io_thread_.message_loop_proxy().get(); 96 io_runner_ = io_thread_.message_loop_proxy().get();
97 CHECK(io_runner_.get()); 97 CHECK(io_runner_.get());
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 base::Bind(&AppChildControllerImpl::Init, base::Unretained(&app_context), 288 base::Bind(&AppChildControllerImpl::Init, base::Unretained(&app_context),
289 base::Passed(platform_channel()), blocker.GetUnblocker())); 289 base::Passed(platform_channel()), blocker.GetUnblocker()));
290 // This will block, then run whatever the controller wants. 290 // This will block, then run whatever the controller wants.
291 blocker.Block(); 291 blocker.Block();
292 292
293 app_context.Shutdown(); 293 app_context.Shutdown();
294 } 294 }
295 295
296 } // namespace shell 296 } // namespace shell
297 } // namespace mojo 297 } // namespace mojo
OLDNEW
« no previous file with comments | « services/window_manager/window_manager_apptest.cc ('k') | shell/application_manager/application_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698