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 module mojo; | 5 module mojo; |
6 | 6 |
7 import "input_events/public/interfaces/input_events.mojom"; | |
8 import "mojo/public/interfaces/application/service_provider.mojom"; | 7 import "mojo/public/interfaces/application/service_provider.mojom"; |
| 8 import "ui/mojo/events/input_events.mojom"; |
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 ViewMangerService::Embed() for details on |services| and | 12 // View. See ViewMangerService::Embed() for details on |services| and |
13 // |exposed_services|. | 13 // |exposed_services|. |
14 Embed(string url, | 14 Embed(string url, |
15 ServiceProvider&? services, | 15 ServiceProvider&? services, |
16 ServiceProvider? exposed_services); | 16 ServiceProvider? exposed_services); |
17 | 17 |
18 SetCapture(uint32 view_id) => (bool success); | 18 SetCapture(uint32 view_id) => (bool success); |
19 FocusWindow(uint32 view_id) => (bool success); | 19 FocusWindow(uint32 view_id) => (bool success); |
20 ActivateWindow(uint32 view_id) => (bool success); | 20 ActivateWindow(uint32 view_id) => (bool success); |
21 | 21 |
22 // Requests the current focus and activation state and an interface to observe | 22 // Requests the current focus and activation state and an interface to observe |
23 // future changes. | 23 // future changes. |
24 // If |observer| is not null capture, focus and activation updates will be | 24 // If |observer| is not null capture, focus and activation updates will be |
25 // sent to it. | 25 // sent to it. |
26 GetFocusedAndActiveViews(WindowManagerObserver? observer) | 26 GetFocusedAndActiveViews(WindowManagerObserver? observer) |
27 => (uint32 capture_view_id, | 27 => (uint32 capture_view_id, |
28 uint32 focused_view_id, | 28 uint32 focused_view_id, |
29 uint32 active_view_id); | 29 uint32 active_view_id); |
30 }; | 30 }; |
31 | 31 |
32 interface WindowManagerObserver { | 32 interface WindowManagerObserver { |
33 OnCaptureChanged(uint32 capture_view_id); | 33 OnCaptureChanged(uint32 capture_view_id); |
34 OnFocusChanged(uint32 focused_view_id); | 34 OnFocusChanged(uint32 focused_view_id); |
35 OnActiveWindowChanged(uint32 focused_view_id); | 35 OnActiveWindowChanged(uint32 focused_view_id); |
36 }; | 36 }; |
OLD | NEW |