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 import "mojo/public/interfaces/application/service_provider.mojom"; | 5 import "mojo/public/interfaces/application/service_provider.mojom" |
6 import "mojo/services/public/interfaces/input_events/input_events.mojom"; | 6 import "mojo/services/public/interfaces/input_events/input_events.mojom" |
7 | 7 |
8 module mojo { | 8 module mojo { |
9 | 9 |
10 interface WindowManager { | 10 interface WindowManager { |
11 // Requests the WindowManager to embed the app for |url| at an appropriate | 11 // Requests the WindowManager to embed the app for |url| at an appropriate |
12 // View. See ViewManger::Embed() for details on |service_provider|. | 12 // View. See ViewManger::Embed() for details on |service_provider|. |
13 Embed(string url, ServiceProvider&? service_provider); | 13 Embed(string url, ServiceProvider&? service_provider); |
14 }; | 14 }; |
15 | 15 |
| 16 // WindowManagerInternalService provides high level window management policies |
| 17 // and is used by the ViewManager. This interface is marked as internal as only |
| 18 // the view manager is allowed to connect to this. |
| 19 [Client=WindowManagerInternalClient] |
| 20 interface WindowManagerInternalService { |
| 21 // Called when an input event is received from the native system. It's |
| 22 // expected that when this is received the WindowManagerInternalService will |
| 23 // call back to WindowManagerInternalServieClient will call |
| 24 // DispatchInputEventToView(). |
| 25 // TODO(sky): nuke this and instead have an interface specifically for |
| 26 // dispatching events in the NativeViewportService. |
| 27 OnViewInputEvent(mojo.Event event); |
| 28 }; |
| 29 |
| 30 // ViewManager provides this interface for functionality only exposed to the |
| 31 // WindowManagerInternalServie. |
| 32 [Client=WindowManagerInternalService] |
| 33 interface WindowManagerInternalClient { |
| 34 // Dispatches the specified input event to the specified view. |
| 35 DispatchInputEventToView(uint32 view_id, mojo.Event event); |
| 36 }; |
| 37 |
16 } | 38 } |
OLD | NEW |