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

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

Issue 1406153004: components/mus/public/interfaces View => Window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet another rebase Created 5 years, 2 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/view_tree.mojom"; 7 import "components/mus/public/interfaces/window_tree.mojom";
8 import "ui/mojo/geometry/geometry.mojom"; 8 import "ui/mojo/geometry/geometry.mojom";
9 9
10 enum WindowManagerErrorCode { 10 enum WindowManagerErrorCode {
11 SUCCESS, 11 SUCCESS,
12 ERROR_ACCESS_DENIED 12 ERROR_ACCESS_DENIED
13 }; 13 };
14 14
15 enum Rotation { 15 enum Rotation {
16 VALUE_0, 16 VALUE_0,
17 VALUE_90, 17 VALUE_90,
18 VALUE_180, 18 VALUE_180,
19 VALUE_270, 19 VALUE_270,
20 }; 20 };
21 21
22 struct Display { 22 struct Display {
23 int64 id; 23 int64 id;
24 mojo.Rect bounds; 24 mojo.Rect bounds;
25 mojo.Rect work_area; 25 mojo.Rect work_area;
26 float device_pixel_ratio; 26 float device_pixel_ratio;
27 Rotation rotation; 27 Rotation rotation;
28 }; 28 };
29 29
30 // Represents a core interface that should be implemented by any window manager 30 // Represents a core interface that should be implemented by any window manager
31 // built on top of Mus. 31 // built on top of Mus.
32 // For security reasons, methods that take window_ids can only pass window ids 32 // For security reasons, methods that take window_ids can only pass window ids
33 // created by calls to OpenWindow() from the *same connection* to the window 33 // created by calls to OpenWindow() from the *same connection* to the window
34 // manager. The callback indicates success or failure. 34 // manager. The callback indicates success or failure.
35 interface WindowManager { 35 interface WindowManager {
36 OpenWindow(mojo.ViewTreeClient client); 36 OpenWindow(WindowTreeClient client);
37 37
38 // Resizes the corresponding window to |size| and centers it in the current 38 // Resizes the corresponding window to |size| and centers it in the current
39 // context. 39 // context.
40 CenterWindow(uint32 window_id, mojo.Size size) => 40 CenterWindow(uint32 window_id, mojo.Size size) =>
41 (WindowManagerErrorCode result); 41 (WindowManagerErrorCode result);
42 42
43 SetBounds(uint32 window_id, mojo.Rect bounds) => 43 SetBounds(uint32 window_id, mojo.Rect bounds) =>
44 (WindowManagerErrorCode result); 44 (WindowManagerErrorCode result);
45 45
46 GetDisplays() => (array<Display> displays); 46 GetDisplays() => (array<Display> displays);
47 }; 47 };
OLDNEW
« no previous file with comments | « components/mus/public/interfaces/view_tree_host.mojom ('k') | components/mus/public/interfaces/window_tree.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698