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

Unified Diff: shell/app_child_process.cc

Issue 775343004: Move //mojo/shell to //shell (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « shell/app_child_process.h ('k') | shell/app_child_process.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/app_child_process.cc
diff --git a/mojo/shell/app_child_process.cc b/shell/app_child_process.cc
similarity index 88%
rename from mojo/shell/app_child_process.cc
rename to shell/app_child_process.cc
index ed254257bf5bb49f5e65e5e8cd689edecdafb20d..3a00843a7aa53f08a708c5a2ec9ac54146b8d2cd 100644
--- a/mojo/shell/app_child_process.cc
+++ b/shell/app_child_process.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "mojo/shell/app_child_process.h"
+#include "shell/app_child_process.h"
#include "base/bind.h"
#include "base/callback_helpers.h"
@@ -21,8 +21,8 @@
#include "mojo/edk/embedder/embedder.h"
#include "mojo/edk/embedder/simple_platform_support.h"
#include "mojo/public/cpp/system/core.h"
-#include "mojo/shell/app_child_process.mojom.h"
-#include "mojo/shell/dynamic_service_runner.h"
+#include "shell/app_child_process.mojom.h"
+#include "shell/dynamic_service_runner.h"
namespace mojo {
namespace shell {
@@ -49,9 +49,7 @@ class Blocker {
private:
friend class Blocker;
- Unblocker(Blocker* blocker) : blocker_(blocker) {
- DCHECK(blocker_);
- }
+ Unblocker(Blocker* blocker) : blocker_(blocker) { DCHECK(blocker_); }
Blocker* blocker_;
@@ -67,9 +65,7 @@ class Blocker {
run_after_.Run();
}
- Unblocker GetUnblocker() {
- return Unblocker(this);
- }
+ Unblocker GetUnblocker() { return Unblocker(this); }
private:
base::WaitableEvent event_;
@@ -89,8 +85,7 @@ static void DestroyController(scoped_ptr<AppChildControllerImpl> controller) {
class AppContext {
public:
AppContext()
- : io_thread_("io_thread"),
- controller_thread_("controller_thread") {}
+ : io_thread_("io_thread"), controller_thread_("controller_thread") {}
~AppContext() {}
void Init() {
@@ -117,21 +112,16 @@ class AppContext {
void Shutdown() {
controller_runner_->PostTask(
- FROM_HERE,
- base::Bind(&DestroyController, base::Passed(&controller_)));
+ FROM_HERE, base::Bind(&DestroyController, base::Passed(&controller_)));
}
- base::SingleThreadTaskRunner* io_runner() const {
- return io_runner_.get();
- }
+ base::SingleThreadTaskRunner* io_runner() const { return io_runner_.get(); }
base::SingleThreadTaskRunner* controller_runner() const {
return controller_runner_.get();
}
- AppChildControllerImpl* controller() const {
- return controller_.get();
- }
+ AppChildControllerImpl* controller() const { return controller_.get(); }
void set_controller(scoped_ptr<AppChildControllerImpl> controller) {
controller_ = controller.Pass();
@@ -166,10 +156,9 @@ class AppChildControllerImpl : public InterfaceImpl<AppChildController> {
// To be executed on the controller thread. Creates the |AppChildController|,
// etc.
- static void Init(
- AppContext* app_context,
- embedder::ScopedPlatformHandle platform_channel,
- const Blocker::Unblocker& unblocker) {
+ static void Init(AppContext* app_context,
+ embedder::ScopedPlatformHandle platform_channel,
+ const Blocker::Unblocker& unblocker) {
DCHECK(app_context);
DCHECK(platform_channel.is_valid());
@@ -179,8 +168,7 @@ class AppChildControllerImpl : public InterfaceImpl<AppChildController> {
new AppChildControllerImpl(app_context, unblocker));
ScopedMessagePipeHandle host_message_pipe(embedder::CreateChannel(
- platform_channel.Pass(),
- app_context->io_runner(),
+ platform_channel.Pass(), app_context->io_runner(),
base::Bind(&AppChildControllerImpl::DidCreateChannel,
base::Unretained(impl.get())),
base::MessageLoopProxy::current()));
@@ -208,10 +196,7 @@ class AppChildControllerImpl : public InterfaceImpl<AppChildController> {
private:
AppChildControllerImpl(AppContext* app_context,
const Blocker::Unblocker& unblocker)
- : app_context_(app_context),
- unblocker_(unblocker),
- channel_info_(NULL) {
- }
+ : app_context_(app_context), unblocker_(unblocker), channel_info_(NULL) {}
// Callback for |embedder::CreateChannel()|.
void DidCreateChannel(embedder::ChannelInfo* channel_info) {
« no previous file with comments | « shell/app_child_process.h ('k') | shell/app_child_process.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698