OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/at_exit.h" |
| 6 #include "base/basictypes.h" |
| 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" |
| 9 #include "base/i18n/icu_util.h" |
| 10 #include "base/logging.h" |
| 11 #include "base/message_loop/message_loop.h" |
| 12 #include "sky/shell/platform_view.h" |
| 13 #include "sky/shell/service_provider.h" |
| 14 #include "sky/shell/shell.h" |
| 15 #include "sky/shell/shell_view.h" |
| 16 |
| 17 namespace sky { |
| 18 namespace shell { |
| 19 |
| 20 void Init() { |
| 21 Shell::Init(make_scoped_ptr(new ServiceProviderContext( |
| 22 base::MessageLoop::current()->task_runner()))); |
| 23 |
| 24 // TODO(abarth): Currently we leak the ShellView. |
| 25 ShellView* shell_view = new ShellView(Shell::Shared()); |
| 26 |
| 27 ViewportObserverPtr viewport_observer; |
| 28 shell_view->view()->ConnectToViewportObserver(GetProxy(&viewport_observer)); |
| 29 |
| 30 // TODO(abarth): At this point we should load some content into the view. |
| 31 // viewport_observer->LoadURL("https://domokit.github.io/home.dart"); |
| 32 } |
| 33 |
| 34 } // namespace shell |
| 35 } // namespace sky |
| 36 |
| 37 int main(int argc, const char* argv[]) { |
| 38 base::AtExitManager exit_manager; |
| 39 base::CommandLine::Init(argc, argv); |
| 40 |
| 41 base::MessageLoop message_loop; |
| 42 |
| 43 base::i18n::InitializeICU(); |
| 44 |
| 45 message_loop.PostTask(FROM_HERE, base::Bind(&sky::shell::Init)); |
| 46 message_loop.Run(); |
| 47 |
| 48 return 0; |
| 49 } |
OLD | NEW |