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 MOJO_SHELL_SHELL_APPLICATION_DELEGATE_H_ | 5 #ifndef MOJO_SHELL_SHELL_APPLICATION_DELEGATE_H_ |
6 #define MOJO_SHELL_SHELL_APPLICATION_DELEGATE_H_ | 6 #define MOJO_SHELL_SHELL_APPLICATION_DELEGATE_H_ |
7 | 7 |
8 #include "mojo/shell/public/cpp/application_delegate.h" | 8 #include "mojo/shell/public/cpp/application_delegate.h" |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 10 matching lines...) Expand all Loading... |
21 class ShellApplicationDelegate | 21 class ShellApplicationDelegate |
22 : public ApplicationDelegate, | 22 : public ApplicationDelegate, |
23 public InterfaceFactory<mojom::ApplicationManager>, | 23 public InterfaceFactory<mojom::ApplicationManager>, |
24 public mojom::ApplicationManager { | 24 public mojom::ApplicationManager { |
25 public: | 25 public: |
26 explicit ShellApplicationDelegate(mojo::shell::ApplicationManager* manager); | 26 explicit ShellApplicationDelegate(mojo::shell::ApplicationManager* manager); |
27 ~ShellApplicationDelegate() override; | 27 ~ShellApplicationDelegate() override; |
28 | 28 |
29 private: | 29 private: |
30 // Overridden from ApplicationDelegate: | 30 // Overridden from ApplicationDelegate: |
31 void Initialize(ApplicationImpl* app) override; | 31 void Initialize(Shell* shell, const std::string& url, uint32_t id) override; |
32 bool AcceptConnection(ApplicationConnection* connection) override; | 32 bool AcceptConnection(ApplicationConnection* connection) override; |
33 | 33 |
34 // Overridden from InterfaceFactory<mojom::ApplicationManager>: | 34 // Overridden from InterfaceFactory<mojom::ApplicationManager>: |
35 void Create( | 35 void Create( |
36 ApplicationConnection* connection, | 36 ApplicationConnection* connection, |
37 InterfaceRequest<mojom::ApplicationManager> request) override; | 37 InterfaceRequest<mojom::ApplicationManager> request) override; |
38 | 38 |
39 // Overridden from mojom::ApplicationManager: | 39 // Overridden from mojom::ApplicationManager: |
40 void CreateInstanceForHandle( | 40 void CreateInstanceForHandle( |
41 ScopedHandle channel, | 41 ScopedHandle channel, |
42 const String& url, | 42 const String& url, |
43 mojom::CapabilityFilterPtr filter, | 43 mojom::CapabilityFilterPtr filter, |
44 InterfaceRequest<mojom::PIDReceiver> pid_receiver) override; | 44 InterfaceRequest<mojom::PIDReceiver> pid_receiver) override; |
45 void AddListener( | 45 void AddListener( |
46 mojom::ApplicationManagerListenerPtr listener) override; | 46 mojom::ApplicationManagerListenerPtr listener) override; |
47 | 47 |
48 mojo::shell::ApplicationManager* manager_; | 48 mojo::shell::ApplicationManager* manager_; |
49 | 49 |
50 WeakBindingSet<mojom::ApplicationManager> bindings_; | 50 WeakBindingSet<mojom::ApplicationManager> bindings_; |
51 | 51 |
52 DISALLOW_COPY_AND_ASSIGN(ShellApplicationDelegate); | 52 DISALLOW_COPY_AND_ASSIGN(ShellApplicationDelegate); |
53 }; | 53 }; |
54 | 54 |
55 } // namespace shell | 55 } // namespace shell |
56 } // namespace mojo | 56 } // namespace mojo |
57 | 57 |
58 #endif // MOJO_SHELL_SHELL_APPLICATION_DELEGATE_H_ | 58 #endif // MOJO_SHELL_SHELL_APPLICATION_DELEGATE_H_ |
OLD | NEW |