| 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 SERVICES_UI_WS_SERVER_WINDOW_H_ | 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_H_ |
| 6 #define SERVICES_UI_WS_SERVER_WINDOW_H_ | 6 #define SERVICES_UI_WS_SERVER_WINDOW_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 using Windows = std::vector<ServerWindow*>; | 49 using Windows = std::vector<ServerWindow*>; |
| 50 | 50 |
| 51 ServerWindow(ServerWindowDelegate* delegate, const WindowId& id); | 51 ServerWindow(ServerWindowDelegate* delegate, const WindowId& id); |
| 52 ServerWindow(ServerWindowDelegate* delegate, | 52 ServerWindow(ServerWindowDelegate* delegate, |
| 53 const WindowId& id, | 53 const WindowId& id, |
| 54 const Properties& properties); | 54 const Properties& properties); |
| 55 ~ServerWindow(); | 55 ~ServerWindow(); |
| 56 | 56 |
| 57 void AddObserver(ServerWindowObserver* observer); | 57 void AddObserver(ServerWindowObserver* observer); |
| 58 void RemoveObserver(ServerWindowObserver* observer); | 58 void RemoveObserver(ServerWindowObserver* observer); |
| 59 bool HasObserver(ServerWindowObserver* observer); |
| 59 | 60 |
| 60 // Creates a new surface of the specified type, replacing the existing. | 61 // Creates a new surface of the specified type, replacing the existing. |
| 61 void CreateSurface(mojom::SurfaceType surface_type, | 62 void CreateSurface(mojom::SurfaceType surface_type, |
| 62 mojo::InterfaceRequest<mojom::Surface> request, | 63 mojo::InterfaceRequest<mojom::Surface> request, |
| 63 mojom::SurfaceClientPtr client); | 64 mojom::SurfaceClientPtr client); |
| 64 | 65 |
| 65 const WindowId& id() const { return id_; } | 66 const WindowId& id() const { return id_; } |
| 66 | 67 |
| 67 void Add(ServerWindow* child); | 68 void Add(ServerWindow* child); |
| 68 void Remove(ServerWindow* child); | 69 void Remove(ServerWindow* child); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 void set_can_focus(bool can_focus) { can_focus_ = can_focus; } | 155 void set_can_focus(bool can_focus) { can_focus_ = can_focus; } |
| 155 bool can_focus() const { return can_focus_; } | 156 bool can_focus() const { return can_focus_; } |
| 156 | 157 |
| 157 void set_can_accept_events(bool value) { can_accept_events_ = value; } | 158 void set_can_accept_events(bool value) { can_accept_events_ = value; } |
| 158 bool can_accept_events() const { return can_accept_events_; } | 159 bool can_accept_events() const { return can_accept_events_; } |
| 159 | 160 |
| 160 // Returns true if this window is attached to a root and all ancestors are | 161 // Returns true if this window is attached to a root and all ancestors are |
| 161 // visible. | 162 // visible. |
| 162 bool IsDrawn() const; | 163 bool IsDrawn() const; |
| 163 | 164 |
| 164 // Called when its appropriate to destroy surfaces scheduled for destruction. | |
| 165 void DestroySurfacesScheduledForDestruction(); | |
| 166 | |
| 167 const gfx::Insets& extended_hit_test_region() const { | 165 const gfx::Insets& extended_hit_test_region() const { |
| 168 return extended_hit_test_region_; | 166 return extended_hit_test_region_; |
| 169 } | 167 } |
| 170 void set_extended_hit_test_region(const gfx::Insets& insets) { | 168 void set_extended_hit_test_region(const gfx::Insets& insets) { |
| 171 extended_hit_test_region_ = insets; | 169 extended_hit_test_region_ = insets; |
| 172 } | 170 } |
| 173 | 171 |
| 174 ServerWindowSurfaceManager* GetOrCreateSurfaceManager(); | 172 ServerWindowSurfaceManager* GetOrCreateSurfaceManager(); |
| 175 ServerWindowSurfaceManager* surface_manager() { | 173 ServerWindowSurfaceManager* surface_manager() { |
| 176 return surface_manager_.get(); | 174 return surface_manager_.get(); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 251 |
| 254 base::ObserverList<ServerWindowObserver> observers_; | 252 base::ObserverList<ServerWindowObserver> observers_; |
| 255 | 253 |
| 256 DISALLOW_COPY_AND_ASSIGN(ServerWindow); | 254 DISALLOW_COPY_AND_ASSIGN(ServerWindow); |
| 257 }; | 255 }; |
| 258 | 256 |
| 259 } // namespace ws | 257 } // namespace ws |
| 260 } // namespace ui | 258 } // namespace ui |
| 261 | 259 |
| 262 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ | 260 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ |
| OLD | NEW |