| 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 "ui/mojo/events/input_event_constants.mojom"; | 7 import "ui/mojo/events/input_event_constants.mojom"; |
| 8 import "ui/mojo/events/input_events.mojom"; | 8 import "ui/mojo/events/input_events.mojom"; |
| 9 import "ui/mojo/events/input_key_codes.mojom"; | 9 import "ui/mojo/events/input_key_codes.mojom"; |
| 10 import "ui/mojo/geometry/geometry.mojom"; | 10 import "ui/mojo/geometry/geometry.mojom"; |
| 11 | 11 |
| 12 // WindowManagerInternal is an interface provided by the WindowManager | 12 // ViewManagerRoot is an interface exposed to the first connection to the |
| 13 // exclusively to the ViewManager. | 13 // ViewManager. |
| 14 interface WindowManagerInternal { | 14 interface ViewManagerRoot { |
| 15 SetViewManagerClient(handle<message_pipe> view_manager_client_request); | 15 SetViewManagerRootClient(ViewManagerRootClient client); |
| 16 | |
| 17 // An accelerator registered via AddAccelerator() has been triggered. | |
| 18 OnAccelerator(mojo.Event event); | |
| 19 }; | |
| 20 | |
| 21 // WindowManagerInternalClient is an interface provide by the ViewManager | |
| 22 // exclusively to the WindowManager. It provides functionality only available | |
| 23 // to the WindowManager. | |
| 24 interface WindowManagerInternalClient { | |
| 25 // TODO(sky): this is only used by sky's testing harness. It should be | |
| 26 // removed. | |
| 27 DispatchInputEventToViewDEPRECATED(uint32 view_id, mojo.Event event); | |
| 28 | 16 |
| 29 // Sets the native viewport size. | 17 // Sets the native viewport size. |
| 30 SetViewportSize(mojo.Size size); | 18 SetViewportSize(mojo.Size size); |
| 31 | 19 |
| 32 // Clones the tree rooted at |view_id|. When the animation completes the clone | 20 // Clones the tree rooted at |view_id|. When the animation completes the clone |
| 33 // is destroyed. | 21 // is destroyed. |
| 34 // TODO(sky): add actual animation. | 22 // TODO(sky): add actual animation. |
| 35 // TODO(sky): I think this only makes sense when destroying (view is | 23 // TODO(sky): I think this only makes sense when destroying (view is |
| 36 // already visible), should it be named to indicate this? | 24 // already visible), should it be named to indicate this? |
| 37 CloneAndAnimate(uint32 view_id); | 25 CloneAndAnimate(uint32 view_id); |
| 38 | 26 |
| 39 // Adds or removes an accelerators. When the ViewManager receives a key event | 27 // Adds or removes an accelerators. When the ViewManager receives a key event |
| 40 // it checks if an accelerator has been registered. If it has, the event is | 28 // it checks if an accelerator has been registered. If it has, the event is |
| 41 // sent to the window manager (OnAccelerator()), if not, the event is sent to | 29 // sent to the window manager (OnAccelerator()), if not, the event is sent to |
| 42 // the focused view. | 30 // the focused view. |
| 43 AddAccelerator(mojo.KeyboardCode keyboard_code, mojo.EventFlags flags); | 31 AddAccelerator(mojo.KeyboardCode keyboard_code, mojo.EventFlags flags); |
| 44 RemoveAccelerator(mojo.KeyboardCode keyboard_code, mojo.EventFlags flags); | 32 RemoveAccelerator(mojo.KeyboardCode keyboard_code, mojo.EventFlags flags); |
| 45 }; | 33 }; |
| 34 |
| 35 interface ViewManagerRootClient { |
| 36 // An accelerator registered via AddAccelerator() has been triggered. |
| 37 OnAccelerator(mojo.Event event); |
| 38 }; |
| 39 |
| OLD | NEW |