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

Unified Diff: sky/shell/linux/main.cc

Issue 1202323002: Port sky_shell to Linux for testing (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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/shell/gpu/rasterizer.h ('k') | sky/shell/linux/platform_service_provider_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/shell/linux/main.cc
diff --git a/sky/shell/linux/main.cc b/sky/shell/linux/main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..a6b021bd7b18df11ea87886e56588a3f5d77e0c1
--- /dev/null
+++ b/sky/shell/linux/main.cc
@@ -0,0 +1,49 @@
+// Copyright 2015 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 "base/at_exit.h"
+#include "base/basictypes.h"
+#include "base/bind.h"
+#include "base/command_line.h"
+#include "base/i18n/icu_util.h"
+#include "base/logging.h"
+#include "base/message_loop/message_loop.h"
+#include "sky/shell/platform_view.h"
+#include "sky/shell/service_provider.h"
+#include "sky/shell/shell.h"
+#include "sky/shell/shell_view.h"
+
+namespace sky {
+namespace shell {
+
+void Init() {
+ Shell::Init(make_scoped_ptr(new ServiceProviderContext(
+ base::MessageLoop::current()->task_runner())));
+
+ // TODO(abarth): Currently we leak the ShellView.
+ ShellView* shell_view = new ShellView(Shell::Shared());
+
+ ViewportObserverPtr viewport_observer;
+ shell_view->view()->ConnectToViewportObserver(GetProxy(&viewport_observer));
+
+ // TODO(abarth): At this point we should load some content into the view.
+ // viewport_observer->LoadURL("https://domokit.github.io/home.dart");
+}
+
+} // namespace shell
+} // namespace sky
+
+int main(int argc, const char* argv[]) {
+ base::AtExitManager exit_manager;
+ base::CommandLine::Init(argc, argv);
+
+ base::MessageLoop message_loop;
+
+ base::i18n::InitializeICU();
+
+ message_loop.PostTask(FROM_HERE, base::Bind(&sky::shell::Init));
+ message_loop.Run();
+
+ return 0;
+}
« no previous file with comments | « sky/shell/gpu/rasterizer.h ('k') | sky/shell/linux/platform_service_provider_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698