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 #ifndef MASH_SHELL_SHELL_APPLICATION_DELEGATE_H_ | 5 #ifndef MASH_SHELL_SHELL_APPLICATION_DELEGATE_H_ |
6 #define MASH_SHELL_SHELL_APPLICATION_DELEGATE_H_ | 6 #define MASH_SHELL_SHELL_APPLICATION_DELEGATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "mash/shell/public/interfaces/shell.mojom.h" | 13 #include "mash/shell/public/interfaces/shell.mojom.h" |
14 #include "mojo/public/cpp/bindings/weak_binding_set.h" | 14 #include "mojo/public/cpp/bindings/binding_set.h" |
15 #include "mojo/public/cpp/bindings/weak_interface_ptr_set.h" | 15 #include "mojo/public/cpp/bindings/interface_ptr_set.h" |
16 #include "mojo/shell/public/cpp/interface_factory.h" | 16 #include "mojo/shell/public/cpp/interface_factory.h" |
17 #include "mojo/shell/public/cpp/shell_client.h" | 17 #include "mojo/shell/public/cpp/shell_client.h" |
18 | 18 |
19 namespace mojo { | 19 namespace mojo { |
20 class Connection; | 20 class Connection; |
21 } | 21 } |
22 | 22 |
23 namespace mash { | 23 namespace mash { |
24 namespace shell { | 24 namespace shell { |
25 | 25 |
(...skipping 30 matching lines...) Expand all Loading... |
56 void StopScreenlock(); | 56 void StopScreenlock(); |
57 | 57 |
58 // Starts the application at |url|, running |restart_callback| if the | 58 // Starts the application at |url|, running |restart_callback| if the |
59 // connection to the application is closed. | 59 // connection to the application is closed. |
60 void StartRestartableService(const std::string& url, | 60 void StartRestartableService(const std::string& url, |
61 const base::Closure& restart_callback); | 61 const base::Closure& restart_callback); |
62 | 62 |
63 mojo::Shell* shell_; | 63 mojo::Shell* shell_; |
64 std::map<std::string, scoped_ptr<mojo::Connection>> connections_; | 64 std::map<std::string, scoped_ptr<mojo::Connection>> connections_; |
65 bool screen_locked_; | 65 bool screen_locked_; |
66 mojo::WeakBindingSet<mash::shell::mojom::Shell> bindings_; | 66 mojo::BindingSet<mash::shell::mojom::Shell> bindings_; |
67 mojo::WeakInterfacePtrSet<mojom::ScreenlockStateListener> | 67 mojo::InterfacePtrSet<mojom::ScreenlockStateListener> screenlock_listeners_; |
68 screenlock_listeners_; | |
69 | 68 |
70 DISALLOW_COPY_AND_ASSIGN(ShellApplicationDelegate); | 69 DISALLOW_COPY_AND_ASSIGN(ShellApplicationDelegate); |
71 }; | 70 }; |
72 | 71 |
73 } // namespace shell | 72 } // namespace shell |
74 } // namespace mash | 73 } // namespace mash |
75 | 74 |
76 #endif // MASH_SHELL_SHELL_APPLICATION_DELEGATE_H_ | 75 #endif // MASH_SHELL_SHELL_APPLICATION_DELEGATE_H_ |
OLD | NEW |