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 mash.wm.mojom; | 5 module mash.wm.mojom; |
6 | 6 |
7 struct UserWindow { | 7 struct UserWindow { |
8 uint32 window_id; | 8 uint32 window_id; |
9 string window_title; | 9 string window_title; |
10 bool window_has_focus; | 10 bool window_has_focus; |
| 11 array<uint8> window_app_icon; // Serialized SkBitmap. |
11 }; | 12 }; |
12 | 13 |
13 // An observer of user windows within mojom::Container::USER_WINDOWS. | 14 // An observer of user windows within mojom::Container::USER_WINDOWS. |
14 // TODO(msw): Observe focus changes, title/icon changes, etc. | 15 // TODO(msw): Observe focus changes, title/icon changes, etc. |
15 interface UserWindowObserver { | 16 interface UserWindowObserver { |
16 // Called when the observer is first added to supply the initial state. | 17 // Called when the observer is first added to supply the initial state. |
17 OnUserWindowObserverAdded(array<UserWindow> user_windows); | 18 OnUserWindowObserverAdded(array<UserWindow> user_windows); |
18 | 19 |
19 OnUserWindowAdded(UserWindow user_window); | 20 OnUserWindowAdded(UserWindow user_window); |
20 OnUserWindowRemoved(uint32 window_id); | 21 OnUserWindowRemoved(uint32 window_id); |
21 | 22 |
22 OnUserWindowTitleChanged(uint32 window_id, string window_title); | 23 OnUserWindowTitleChanged(uint32 window_id, string window_title); |
| 24 |
| 25 // |app_icon| is a serialized SkBitmap. |
| 26 OnUserWindowAppIconChanged(uint32 window_id, array<uint8> app_icon); |
23 | 27 |
24 OnUserWindowFocusChanged(uint32 window_id, bool has_focus); | 28 OnUserWindowFocusChanged(uint32 window_id, bool has_focus); |
25 }; | 29 }; |
26 | 30 |
27 // An interface allowing system UIs to manage the set of user windows. | 31 // An interface allowing system UIs to manage the set of user windows. |
28 // TODO(msw): Add minimization, restoration, opening a chooser view, etc. | 32 // TODO(msw): Add minimization, restoration, opening a chooser view, etc. |
29 interface UserWindowController { | 33 interface UserWindowController { |
30 AddUserWindowObserver(UserWindowObserver observer); | 34 AddUserWindowObserver(UserWindowObserver observer); |
31 FocusUserWindow(uint32 window_id); | 35 FocusUserWindow(uint32 window_id); |
32 }; | 36 }; |
OLD | NEW |