Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(516)

Side by Side Diff: components/mus/public/interfaces/window_manager.mojom

Issue 1656123002: Moves accelerator registration to WindowManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mandoline Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_matcher.mojom";
8 import "components/mus/public/interfaces/input_events.mojom";
7 import "components/mus/public/interfaces/window_manager_constants.mojom"; 9 import "components/mus/public/interfaces/window_manager_constants.mojom";
8 import "ui/mojo/geometry/geometry.mojom"; 10 import "ui/mojo/geometry/geometry.mojom";
9 11
10 // WindowManager is used when a WindowTreeClient attempts to modify 12 // WindowManager is used when a WindowTreeClient attempts to modify
11 // a property of the embed root. When this happens WindowTree calls the 13 // a property of the embed root. When this happens WindowTree calls the
12 // appropriate function on WindowManager. For example, if a 14 // appropriate function on WindowManager. For example, if a
13 // WindowTreeClient calls SetWindowBounds() on its embed root, WindowTree 15 // WindowTreeClient calls SetWindowBounds() on its embed root, WindowTree
14 // calls WmSetBounds(). WindowManager can then decide if it wants to 16 // calls WmSetBounds(). WindowManager can then decide if it wants to
15 // change the bounds or not. 17 // change the bounds or not.
16 // 18 //
(...skipping 20 matching lines...) Expand all
37 // When the WindowManager completes a request it must call back to 39 // When the WindowManager completes a request it must call back to
38 // WindowManagerClient::WmResponse(). 40 // WindowManagerClient::WmResponse().
39 WmSetBounds(uint32 change_id, uint32 window_id, mojo.Rect bounds); 41 WmSetBounds(uint32 change_id, uint32 window_id, mojo.Rect bounds);
40 WmSetProperty(uint32 change_id, 42 WmSetProperty(uint32 change_id,
41 uint32 window_id, 43 uint32 window_id,
42 string name, 44 string name,
43 array<uint8>? value); 45 array<uint8>? value);
44 // Asks the WindowManager to create a new window. 46 // Asks the WindowManager to create a new window.
45 WmCreateTopLevelWindow(uint32 change_id, 47 WmCreateTopLevelWindow(uint32 change_id,
46 map<string, array<uint8>> properties); 48 map<string, array<uint8>> properties);
49
50 // An accelerator registered via AddAccelerator() has been triggered.
51 OnAccelerator(uint32 id, Event event);
47 }; 52 };
48 53
49 // This interface is only used as an associated interface and is associated 54 // This interface is only used as an associated interface and is associated
50 // with WindowTree. 55 // with WindowTree.
51 interface WindowManagerClient { 56 interface WindowManagerClient {
57 // Add and remove accelerators. When accelerators are registered the
58 // WindowManager receives the event via OnAccelerator() rather than the
59 // target window. The id is defined by the client and can be used to more
60 // easily identify the accelerator's action. If an accelerator with the same
61 // id or the same matcher already exists, then the accelerator is not added.
62 AddAccelerator(uint32 id, EventMatcher matcher) => (bool success);
63 RemoveAccelerator(uint32 id);
64
52 // The window manager has completed a request with the specific change id. 65 // The window manager has completed a request with the specific change id.
53 WmResponse(uint32 change_id, bool response); 66 WmResponse(uint32 change_id, bool response);
54 67
55 // Calls WindowTreeClient::RequestClose() on the embedded app at the 68 // Calls WindowTreeClient::RequestClose() on the embedded app at the
56 // specified window. 69 // specified window.
57 WmRequestClose(uint32 window_id); 70 WmRequestClose(uint32 window_id);
58 71
59 // Sets the frame decoration constants of the display the window manager is 72 // Sets the frame decoration constants of the display the window manager is
60 // associated with. 73 // associated with.
61 WmSetFrameDecorationValues(FrameDecorationValues values); 74 WmSetFrameDecorationValues(FrameDecorationValues values);
62 75
63 // Response from WmCreateTopLevelWindow() informing the client of the id for 76 // Response from WmCreateTopLevelWindow() informing the client of the id for
64 // the new window. 77 // the new window.
65 OnWmCreatedTopLevelWindow(uint32 change_id, uint32 window_id); 78 OnWmCreatedTopLevelWindow(uint32 change_id, uint32 window_id);
66 }; 79 };
OLDNEW
« no previous file with comments | « components/mus/public/cpp/window_manager_delegate.h ('k') | components/mus/public/interfaces/window_tree_host.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698