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 #ifndef COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ |
6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ |
7 | 7 |
| 8 #include <map> |
8 #include <string> | 9 #include <string> |
| 10 #include <vector> |
9 | 11 |
10 #include "components/mus/common/types.h" | 12 #include "components/mus/common/types.h" |
11 #include "components/mus/public/interfaces/window_tree.mojom.h" | 13 #include "components/mus/public/interfaces/window_tree.mojom.h" |
12 #include "mojo/public/cpp/bindings/interface_request.h" | 14 #include "mojo/public/cpp/bindings/interface_request.h" |
13 | 15 |
14 namespace mus { | 16 namespace mus { |
15 | 17 |
16 class Window; | 18 class Window; |
17 class WindowManagerDelegate; | 19 class WindowManagerDelegate; |
18 class WindowTreeDelegate; | 20 class WindowTreeDelegate; |
(...skipping 30 matching lines...) Expand all Loading... |
49 | 51 |
50 // Returns a Window known to this connection. | 52 // Returns a Window known to this connection. |
51 virtual Window* GetWindowById(Id id) = 0; | 53 virtual Window* GetWindowById(Id id) = 0; |
52 | 54 |
53 // Returns the focused window; null if focus is not yet known or another app | 55 // Returns the focused window; null if focus is not yet known or another app |
54 // is focused. | 56 // is focused. |
55 virtual Window* GetFocusedWindow() = 0; | 57 virtual Window* GetFocusedWindow() = 0; |
56 | 58 |
57 // Creates and returns a new Window (which is owned by the window server). | 59 // Creates and returns a new Window (which is owned by the window server). |
58 // Windows are initially hidden, use SetVisible(true) to show. | 60 // Windows are initially hidden, use SetVisible(true) to show. |
59 virtual Window* NewWindow() = 0; | 61 Window* NewWindow() { return NewWindow(nullptr); } |
| 62 virtual Window* NewWindow( |
| 63 const std::map<std::string, std::vector<uint8_t>>* properties) = 0; |
60 | 64 |
61 // Returns true if ACCESS_POLICY_EMBED_ROOT was specified. | 65 // Returns true if ACCESS_POLICY_EMBED_ROOT was specified. |
62 virtual bool IsEmbedRoot() = 0; | 66 virtual bool IsEmbedRoot() = 0; |
63 | 67 |
64 // Returns the id for this connection. | 68 // Returns the id for this connection. |
65 virtual ConnectionSpecificId GetConnectionId() = 0; | 69 virtual ConnectionSpecificId GetConnectionId() = 0; |
66 }; | 70 }; |
67 | 71 |
68 } // namespace mus | 72 } // namespace mus |
69 | 73 |
70 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ | 74 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ |
OLD | NEW |