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

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

Issue 1203143004: Make it possible to run Sky apps offline (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: gn check 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/ios/sky_surface.mm ('k') | sky/shell/ui/engine.h » ('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
index a6b021bd7b18df11ea87886e56588a3f5d77e0c1..56fd84f5ae306e3510adf74ae1182c65802ac9e0 100644
--- a/sky/shell/linux/main.cc
+++ b/sky/shell/linux/main.cc
@@ -17,6 +17,9 @@
namespace sky {
namespace shell {
+const char kMain[] = "main";
+const char kPackageRoot[] = "package-root";
+
void Init() {
Shell::Init(make_scoped_ptr(new ServiceProviderContext(
base::MessageLoop::current()->task_runner())));
@@ -27,8 +30,12 @@ void Init() {
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");
+ base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess();
+
+ std::string main = command_line.GetSwitchValueASCII(kMain);
+ std::string package_root = command_line.GetSwitchValueASCII(kPackageRoot);
+
+ viewport_observer->RunFromFile(main, package_root);
}
} // namespace shell
« no previous file with comments | « sky/shell/ios/sky_surface.mm ('k') | sky/shell/ui/engine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698