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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "components/mus/common/types.h" | 14 #include "components/mus/common/types.h" |
| 15 #include "components/mus/public/cpp/mus_public_export.h" |
15 #include "components/mus/public/interfaces/input_event_constants.mojom.h" | 16 #include "components/mus/public/interfaces/input_event_constants.mojom.h" |
16 #include "components/mus/public/interfaces/window_tree.mojom.h" | 17 #include "components/mus/public/interfaces/window_tree.mojom.h" |
17 #include "mojo/public/cpp/bindings/interface_request.h" | 18 #include "mojo/public/cpp/bindings/interface_request.h" |
18 | 19 |
19 namespace gfx { | 20 namespace gfx { |
20 class Point; | 21 class Point; |
21 } | 22 } |
22 | 23 |
23 namespace shell { | 24 namespace shell { |
24 class Connector; | 25 class Connector; |
25 } | 26 } |
26 | 27 |
27 namespace mus { | 28 namespace mus { |
28 | 29 |
29 class Window; | 30 class Window; |
30 class WindowManagerDelegate; | 31 class WindowManagerDelegate; |
31 class WindowTreeConnectionObserver; | 32 class WindowTreeConnectionObserver; |
32 class WindowTreeDelegate; | 33 class WindowTreeDelegate; |
33 | 34 |
34 // Encapsulates a connection to a window tree. A unique connection is made | 35 // Encapsulates a connection to a window tree. A unique connection is made |
35 // every time an app is embedded. | 36 // every time an app is embedded. |
36 class WindowTreeConnection { | 37 class MUS_PUBLIC_EXPORT WindowTreeConnection { |
37 public: | 38 public: |
38 enum class CreateType { | 39 enum class CreateType { |
39 // Indicates Create() should wait for OnEmbed(). If true, the | 40 // Indicates Create() should wait for OnEmbed(). If true, the |
40 // WindowTreeConnection returned from Create() will have its root, otherwise | 41 // WindowTreeConnection returned from Create() will have its root, otherwise |
41 // the WindowTreeConnection will get the root at a later time. | 42 // the WindowTreeConnection will get the root at a later time. |
42 WAIT_FOR_EMBED, | 43 WAIT_FOR_EMBED, |
43 DONT_WAIT_FOR_EMBED | 44 DONT_WAIT_FOR_EMBED |
44 }; | 45 }; |
45 | 46 |
46 virtual ~WindowTreeConnection() {} | 47 virtual ~WindowTreeConnection() {} |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 virtual Window* NewTopLevelWindow( | 100 virtual Window* NewTopLevelWindow( |
100 const std::map<std::string, std::vector<uint8_t>>* properties) = 0; | 101 const std::map<std::string, std::vector<uint8_t>>* properties) = 0; |
101 | 102 |
102 virtual void AddObserver(WindowTreeConnectionObserver* observer) = 0; | 103 virtual void AddObserver(WindowTreeConnectionObserver* observer) = 0; |
103 virtual void RemoveObserver(WindowTreeConnectionObserver* observer) = 0; | 104 virtual void RemoveObserver(WindowTreeConnectionObserver* observer) = 0; |
104 }; | 105 }; |
105 | 106 |
106 } // namespace mus | 107 } // namespace mus |
107 | 108 |
108 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ | 109 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ |
OLD | NEW |