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

Unified Diff: sky/framework/inspector/server/server.cc

Issue 687673003: Add beginnings of an inspector backend for Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/framework/inspector/server/inspector_frontend_impl.cc ('k') | sky/framework/inspector/worker-agent.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/inspector/server/server.cc
diff --git a/sky/framework/inspector/server/server.cc b/sky/framework/inspector/server/server.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9f078d94058bdc725d89601278e5933c62b2d524
--- /dev/null
+++ b/sky/framework/inspector/server/server.cc
@@ -0,0 +1,42 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "mojo/application/application_runner_chromium.h"
+#include "mojo/public/c/system/main.h"
+#include "mojo/public/cpp/application/application_delegate.h"
+#include "mojo/public/cpp/application/application_impl.h"
+#include "sky/framework/inspector/server/inspector_frontend_impl.h"
+
+namespace sky {
+namespace inspector {
+
+class Server : public mojo::ApplicationDelegate {
+ public:
+ Server() {}
+ virtual ~Server() {}
+
+ private:
+ // Overridden from mojo::ApplicationDelegate:
+ virtual void Initialize(mojo::ApplicationImpl* app) override {
+ }
+
+ virtual bool ConfigureIncomingConnection(
+ mojo::ApplicationConnection* connection) override {
+ connection->AddService(&fronend_factory_);
+ return true;
+ }
+
+ InspectorFronendFactory fronend_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(Server);
+};
+
+} // namespace inspector
+} // namespace sky
+
+MojoResult MojoMain(MojoHandle shell_handle) {
+ mojo::ApplicationRunnerChromium runner(new sky::inspector::Server);
+ runner.set_message_loop_type(base::MessageLoop::TYPE_IO);
+ return runner.Run(shell_handle);
+}
« no previous file with comments | « sky/framework/inspector/server/inspector_frontend_impl.cc ('k') | sky/framework/inspector/worker-agent.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698