OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "mash/shell/shell_application_delegate.h" | 5 #include "mash/shell/shell_application_delegate.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "mojo/application/public/cpp/application_connection.h" | 8 #include "mojo/shell/public/cpp/application_connection.h" |
9 #include "mojo/application/public/cpp/application_impl.h" | 9 #include "mojo/shell/public/cpp/application_impl.h" |
10 | 10 |
11 namespace mash { | 11 namespace mash { |
12 namespace shell { | 12 namespace shell { |
13 | 13 |
14 ShellApplicationDelegate::ShellApplicationDelegate() : app_(nullptr) {} | 14 ShellApplicationDelegate::ShellApplicationDelegate() : app_(nullptr) {} |
15 | 15 |
16 ShellApplicationDelegate::~ShellApplicationDelegate() {} | 16 ShellApplicationDelegate::~ShellApplicationDelegate() {} |
17 | 17 |
18 void ShellApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { | 18 void ShellApplicationDelegate::Initialize(mojo::ApplicationImpl* app) { |
19 app_ = app; | 19 app_ = app; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // TODO(beng): This would be the place to insert logic that counted restarts | 68 // TODO(beng): This would be the place to insert logic that counted restarts |
69 // to avoid infinite crash-restart loops. | 69 // to avoid infinite crash-restart loops. |
70 scoped_ptr<mojo::ApplicationConnection> connection = | 70 scoped_ptr<mojo::ApplicationConnection> connection = |
71 app_->ConnectToApplication(url); | 71 app_->ConnectToApplication(url); |
72 connection->SetRemoteServiceProviderConnectionErrorHandler(restart_callback); | 72 connection->SetRemoteServiceProviderConnectionErrorHandler(restart_callback); |
73 connections_[url] = std::move(connection); | 73 connections_[url] = std::move(connection); |
74 } | 74 } |
75 | 75 |
76 } // namespace shell | 76 } // namespace shell |
77 } // namespace main | 77 } // namespace main |
OLD | NEW |