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 module mus.mojom; | 5 module mus.mojom; |
6 | 6 |
7 import "components/mus/public/interfaces/input_event_constants.mojom"; | 7 import "components/mus/public/interfaces/input_event_constants.mojom"; |
8 import "components/mus/public/interfaces/input_event_matcher.mojom"; | 8 import "components/mus/public/interfaces/input_event_matcher.mojom"; |
9 import "components/mus/public/interfaces/input_events.mojom"; | 9 import "components/mus/public/interfaces/input_events.mojom"; |
10 import "components/mus/public/interfaces/input_key_codes.mojom"; | 10 import "components/mus/public/interfaces/input_key_codes.mojom"; |
11 import "components/mus/public/interfaces/window_manager.mojom"; | 11 import "components/mus/public/interfaces/window_manager.mojom"; |
12 import "components/mus/public/interfaces/window_tree.mojom"; | 12 import "components/mus/public/interfaces/window_tree.mojom"; |
13 import "ui/mojo/geometry/geometry.mojom"; | 13 import "ui/mojo/geometry/geometry.mojom"; |
14 | 14 |
15 // WindowTreeHost encapsulates a unique underlying platform window, with a tree | 15 // WindowTreeHost encapsulates a unique underlying platform window, with a tree |
16 // of windows. | 16 // of windows. |
17 interface WindowTreeHost { | 17 interface WindowTreeHost { |
18 // Sets the size of the platform window. | 18 // Sets the size of the platform window. |
19 SetSize(mojo.Size size); | 19 SetSize(mojo.Size size); |
20 | 20 |
21 // Sets a title string to be displayed on the platform window. | 21 // Sets a title string to be displayed on the platform window. |
22 SetTitle(string title); | 22 SetTitle(string title); |
23 | 23 |
24 // Add and remove accelerators. When accelerators are registered the | 24 // Add and remove accelerators. When accelerators are registered the |
25 // WindowTreeHostClient receives the event via OnAccelerator() rather than the | 25 // WindowTreeHostClient receives the event via OnAccelerator() rather than the |
26 // target window. The id is defined by the client and can be used to more | 26 // target window. The id is defined by the client and can be used to more |
27 // easily identify the accelerator's action. | 27 // easily identify the accelerator's action. |
28 AddAccelerator(uint32 id, EventMatcher matcher); | 28 AddAccelerator(uint32 id, EventMatcher matcher); |
29 RemoveAccelerator(uint32 id); | 29 RemoveAccelerator(uint32 id); |
30 | |
31 // Enables (or disables) child windows of |window_id| to be activated. | |
32 SetActivationParent(uint32 window_id, bool enable); | |
Ben Goodger (Google)
2015/11/19 07:26:24
how about AddActivationParent & RemoveActivationPa
sadrul
2015/11/19 19:33:34
Done.
| |
30 }; | 33 }; |
31 | 34 |
32 interface WindowTreeHostClient { | 35 interface WindowTreeHostClient { |
33 // An accelerator registered via AddAccelerator() has been triggered. | 36 // An accelerator registered via AddAccelerator() has been triggered. |
34 OnAccelerator(uint32 id, Event event); | 37 OnAccelerator(uint32 id, Event event); |
35 }; | 38 }; |
36 | 39 |
37 interface WindowTreeHostFactory { | 40 interface WindowTreeHostFactory { |
38 CreateWindowTreeHost(WindowTreeHost& window_tree_host, | 41 CreateWindowTreeHost(WindowTreeHost& window_tree_host, |
39 WindowTreeHostClient? host_client, | 42 WindowTreeHostClient? host_client, |
40 WindowTreeClient tree_client, | 43 WindowTreeClient tree_client, |
41 WindowManager? window_manager); | 44 WindowManager? window_manager); |
42 }; | 45 }; |
OLD | NEW |