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

Side by Side Diff: services/ui/public/interfaces/window_manager_constants.mojom

Issue 2161993002: Start using display.mojom.Display in mus+ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@display_traits
Patch Set: Formatting. Created 4 years, 5 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 ui.mojom; 5 module ui.mojom;
6 6
7 import "services/ui/public/interfaces/display/display.mojom";
7 import "ui/gfx/geometry/mojo/geometry.mojom"; 8 import "ui/gfx/geometry/mojo/geometry.mojom";
8 9
9 enum WindowManagerErrorCode { 10 enum WindowManagerErrorCode {
10 SUCCESS, 11 SUCCESS,
11 ACCESS_DENIED 12 ACCESS_DENIED
12 }; 13 };
13 14
14 // TODO(sky): seems like this should not be defined in mus, rather in mash. 15 // TODO(sky): seems like this should not be defined in mus, rather in mash.
15 // Only thing mus cares about is minimized and that should be expressed 16 // Only thing mus cares about is minimized and that should be expressed
16 // differently. 17 // differently.
17 enum ShowState { 18 enum ShowState {
18 DEFAULT, 19 DEFAULT,
19 NORMAL, 20 NORMAL,
20 MINIMIZED, 21 MINIMIZED,
21 MAXIMIZED, 22 MAXIMIZED,
22 INACTIVE, 23 INACTIVE,
23 FULLSCREEN, 24 FULLSCREEN,
24 DOCKED, 25 DOCKED,
25 }; 26 };
26 27
27 enum Rotation {
28 VALUE_0,
29 VALUE_90,
30 VALUE_180,
31 VALUE_270,
32 };
33
34 const int32 kResizeBehaviorNone = 0; 28 const int32 kResizeBehaviorNone = 0;
35 const int32 kResizeBehaviorCanResize = 1; 29 const int32 kResizeBehaviorCanResize = 1;
36 const int32 kResizeBehaviorCanMaximize = 2; 30 const int32 kResizeBehaviorCanMaximize = 2;
37 const int32 kResizeBehaviorCanMinimize = 4; 31 const int32 kResizeBehaviorCanMinimize = 4;
38 32
39 struct FrameDecorationValues { 33 struct FrameDecorationValues {
40 gfx.mojom.Insets normal_client_area_insets; 34 gfx.mojom.Insets normal_client_area_insets;
41 gfx.mojom.Insets maximized_client_area_insets; 35 gfx.mojom.Insets maximized_client_area_insets;
42 // Max width needed to display the buttons on the title bar. The buttons are 36 // Max width needed to display the buttons on the title bar. The buttons are
43 // aligned to the trailing edge of the titlebar. 37 // aligned to the trailing edge of the titlebar.
44 // TODO(sky): this API is very narrow, and assumes a particular config. 38 // TODO(sky): this API is very narrow, and assumes a particular config.
45 uint32 max_title_bar_button_width; 39 uint32 max_title_bar_button_width;
46 }; 40 };
47 41
48 enum TouchSupport { 42 struct WmDisplay {
sky 2016/07/19 18:07:15 This names implies the display is for or from the
kylechar 2016/07/19 18:55:20 WsDisplay it is.
49 UNKNOWN, 43 display.mojom.Display display;
50 AVAILABLE,
51 UNAVAILABLE,
52 };
53
54 struct Display {
55 int64 id;
56 gfx.mojom.Rect bounds;
57 gfx.mojom.Rect work_area;
58 float device_pixel_ratio;
59 Rotation rotation;
60 TouchSupport touch_support;
61 bool is_primary; 44 bool is_primary;
62 FrameDecorationValues frame_decoration_values; 45 FrameDecorationValues frame_decoration_values;
63 }; 46 };
64 47
65 // Whether a client initiated move loop was started with a mouse event or a 48 // Whether a client initiated move loop was started with a mouse event or a
66 // touch event. 49 // touch event.
67 enum MoveLoopSource { 50 enum MoveLoopSource {
68 MOUSE, 51 MOUSE,
69 TOUCH 52 TOUCH
70 }; 53 };
71 54
72 enum WindowType { 55 enum WindowType {
73 // These constants come from Widget::InitParams. See it for details. 56 // These constants come from Widget::InitParams. See it for details.
74 // TODO: see if we can reduce this set. For example, why do we need both 57 // TODO: see if we can reduce this set. For example, why do we need both
75 // BUBBLE and POPUP. 58 // BUBBLE and POPUP.
76 WINDOW, 59 WINDOW,
77 PANEL, 60 PANEL,
78 WINDOW_FRAMELESS, 61 WINDOW_FRAMELESS,
79 CONTROL, 62 CONTROL,
80 POPUP, 63 POPUP,
81 MENU, 64 MENU,
82 TOOLTIP, 65 TOOLTIP,
83 BUBBLE, 66 BUBBLE,
84 DRAG, 67 DRAG,
85 }; 68 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698