OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SERVICES_PUBLIC_CPP_VIEW_MANAGER_WINDOW_MANAGER_DELEGATE_H_ | 5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_WINDOW_MANAGER_DELEGATE_H_ |
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_WINDOW_MANAGER_DELEGATE_H_ | 6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_WINDOW_MANAGER_DELEGATE_H_ |
7 | 7 |
| 8 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
8 #include "mojo/services/public/interfaces/input_events/input_events.mojom.h" | 9 #include "mojo/services/public/interfaces/input_events/input_events.mojom.h" |
9 | 10 |
10 namespace mojo { | 11 namespace mojo { |
11 | 12 |
12 class View; | 13 class View; |
13 | 14 |
14 // A WindowManagerDelegate is provided by the application embedded at the | 15 // A WindowManagerDelegate is provided by the application embedded at the |
15 // service root node. | 16 // service root node. |
16 class WindowManagerDelegate { | 17 class WindowManagerDelegate { |
17 public: | 18 public: |
18 // Create an appropriate node to embed |url|. | 19 // Create an appropriate node to embed |url|. |
19 virtual void Embed(const String& url) = 0; | 20 virtual void Embed(const String& url, |
| 21 InterfaceRequest<ServiceProvider> service_provider) {} |
20 | 22 |
21 // Dispatch the supplied input event to the appropriate view (taking into | 23 // Dispatch the supplied input event to the appropriate view (taking into |
22 // account focus, activation, modality, etc.). | 24 // account focus, activation, modality, etc.). |
23 virtual void DispatchEvent(View* target, EventPtr event) = 0; | 25 virtual void DispatchEvent(View* target, EventPtr event) = 0; |
24 | 26 |
25 protected: | 27 protected: |
26 virtual ~WindowManagerDelegate() {} | 28 virtual ~WindowManagerDelegate() {} |
27 }; | 29 }; |
28 | 30 |
29 } // namespace mojo | 31 } // namespace mojo |
30 | 32 |
31 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_WINDOW_MANAGER_DELEGATE_H_ | 33 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_WINDOW_MANAGER_DELEGATE_H_ |
OLD | NEW |