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/shell/public/cpp/connection.h" | 8 #include "mojo/shell/public/cpp/connection.h" |
9 #include "mojo/shell/public/cpp/shell.h" | 9 #include "mojo/shell/public/cpp/shell.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 uint32_t id) { | 21 uint32_t id) { |
22 shell_ = shell; | 22 shell_ = shell; |
23 StartBrowserDriver(); | 23 StartBrowserDriver(); |
24 StartWindowManager(); | 24 StartWindowManager(); |
25 StartWallpaper(); | 25 StartWallpaper(); |
26 StartShelf(); | 26 StartShelf(); |
27 StartQuickLaunch(); | 27 StartQuickLaunch(); |
28 } | 28 } |
29 | 29 |
30 bool ShellApplicationDelegate::AcceptConnection(mojo::Connection* connection) { | 30 bool ShellApplicationDelegate::AcceptConnection(mojo::Connection* connection) { |
31 connection->AddService<mash::shell::mojom::Shell>(this); | 31 connection->AddInterface<mash::shell::mojom::Shell>(this); |
32 return true; | 32 return true; |
33 } | 33 } |
34 | 34 |
35 void ShellApplicationDelegate::AddScreenlockStateListener( | 35 void ShellApplicationDelegate::AddScreenlockStateListener( |
36 mojom::ScreenlockStateListenerPtr listener) { | 36 mojom::ScreenlockStateListenerPtr listener) { |
37 listener->ScreenlockStateChanged(screen_locked_); | 37 listener->ScreenlockStateChanged(screen_locked_); |
38 screenlock_listeners_.AddInterfacePtr(std::move(listener)); | 38 screenlock_listeners_.AddInterfacePtr(std::move(listener)); |
39 } | 39 } |
40 | 40 |
41 void ShellApplicationDelegate::LockScreen() { | 41 void ShellApplicationDelegate::LockScreen() { |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 const base::Closure& restart_callback) { | 116 const base::Closure& restart_callback) { |
117 // TODO(beng): This would be the place to insert logic that counted restarts | 117 // TODO(beng): This would be the place to insert logic that counted restarts |
118 // to avoid infinite crash-restart loops. | 118 // to avoid infinite crash-restart loops. |
119 scoped_ptr<mojo::Connection> connection = shell_->Connect(url); | 119 scoped_ptr<mojo::Connection> connection = shell_->Connect(url); |
120 connection->SetRemoteServiceProviderConnectionErrorHandler(restart_callback); | 120 connection->SetRemoteServiceProviderConnectionErrorHandler(restart_callback); |
121 connections_[url] = std::move(connection); | 121 connections_[url] = std::move(connection); |
122 } | 122 } |
123 | 123 |
124 } // namespace shell | 124 } // namespace shell |
125 } // namespace main | 125 } // namespace main |
OLD | NEW |