| 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> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 virtual Window* GetWindowById(Id id) = 0; | 70 virtual Window* GetWindowById(Id id) = 0; |
| 71 | 71 |
| 72 // Returns the Window with input capture; null if no window has requested | 72 // Returns the Window with input capture; null if no window has requested |
| 73 // input capture, or if another app has capture. | 73 // input capture, or if another app has capture. |
| 74 virtual Window* GetCaptureWindow() = 0; | 74 virtual Window* GetCaptureWindow() = 0; |
| 75 | 75 |
| 76 // Returns the focused window; null if focus is not yet known or another app | 76 // Returns the focused window; null if focus is not yet known or another app |
| 77 // is focused. | 77 // is focused. |
| 78 virtual Window* GetFocusedWindow() = 0; | 78 virtual Window* GetFocusedWindow() = 0; |
| 79 | 79 |
| 80 // Sets focus to null. This does nothing if focus is currently null. |
| 81 virtual void ClearFocus() = 0; |
| 82 |
| 80 // Creates and returns a new Window (which is owned by the window server). | 83 // Creates and returns a new Window (which is owned by the window server). |
| 81 // Windows are initially hidden, use SetVisible(true) to show. | 84 // Windows are initially hidden, use SetVisible(true) to show. |
| 82 Window* NewWindow() { return NewWindow(nullptr); } | 85 Window* NewWindow() { return NewWindow(nullptr); } |
| 83 virtual Window* NewWindow( | 86 virtual Window* NewWindow( |
| 84 const std::map<std::string, std::vector<uint8_t>>* properties) = 0; | 87 const std::map<std::string, std::vector<uint8_t>>* properties) = 0; |
| 85 virtual Window* NewTopLevelWindow( | 88 virtual Window* NewTopLevelWindow( |
| 86 const std::map<std::string, std::vector<uint8_t>>* properties) = 0; | 89 const std::map<std::string, std::vector<uint8_t>>* properties) = 0; |
| 87 | 90 |
| 88 // Returns the id for this connection. | 91 // Returns the id for this connection. |
| 89 // TODO(sky): remove this. It is not necessarily correct anymore. | 92 // TODO(sky): remove this. It is not necessarily correct anymore. |
| 90 virtual ConnectionSpecificId GetConnectionId() = 0; | 93 virtual ConnectionSpecificId GetConnectionId() = 0; |
| 91 | 94 |
| 92 virtual void AddObserver(WindowTreeConnectionObserver* observer) = 0; | 95 virtual void AddObserver(WindowTreeConnectionObserver* observer) = 0; |
| 93 virtual void RemoveObserver(WindowTreeConnectionObserver* observer) = 0; | 96 virtual void RemoveObserver(WindowTreeConnectionObserver* observer) = 0; |
| 94 }; | 97 }; |
| 95 | 98 |
| 96 } // namespace mus | 99 } // namespace mus |
| 97 | 100 |
| 98 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ | 101 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_CONNECTION_H_ |
| OLD | NEW |