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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 const ServerWindowSurfaceManager* surface_manager() const { | 174 const ServerWindowSurfaceManager* surface_manager() const { |
175 return surface_manager_.get(); | 175 return surface_manager_.get(); |
176 } | 176 } |
177 | 177 |
178 // Offset of the underlay from the the window bounds (used for shadows). | 178 // Offset of the underlay from the the window bounds (used for shadows). |
179 const gfx::Vector2d& underlay_offset() const { return underlay_offset_; } | 179 const gfx::Vector2d& underlay_offset() const { return underlay_offset_; } |
180 void SetUnderlayOffset(const gfx::Vector2d& offset); | 180 void SetUnderlayOffset(const gfx::Vector2d& offset); |
181 | 181 |
182 ServerWindowDelegate* delegate() { return delegate_; } | 182 ServerWindowDelegate* delegate() { return delegate_; } |
183 | 183 |
184 void SetAcceptEvents(bool accept_events) { accept_events_ = accept_events; } | |
sky
2016/07/06 16:21:25
set_accept_events and accept_events() const (see s
riajiang
2016/07/08 17:59:59
Done.
| |
185 bool AcceptEvents() { return accept_events_; } | |
186 | |
184 #if !defined(NDEBUG) | 187 #if !defined(NDEBUG) |
185 std::string GetDebugWindowHierarchy() const; | 188 std::string GetDebugWindowHierarchy() const; |
186 void BuildDebugInfo(const std::string& depth, std::string* result) const; | 189 void BuildDebugInfo(const std::string& depth, std::string* result) const; |
187 #endif | 190 #endif |
188 | 191 |
189 private: | 192 private: |
190 // Implementation of removing a window. Doesn't send any notification. | 193 // Implementation of removing a window. Doesn't send any notification. |
191 void RemoveImpl(ServerWindow* window); | 194 void RemoveImpl(ServerWindow* window); |
192 | 195 |
193 // Called when this window's stacking order among its siblings is changed. | 196 // Called when this window's stacking order among its siblings is changed. |
(...skipping 24 matching lines...) Expand all Loading... | |
218 gfx::Rect bounds_; | 221 gfx::Rect bounds_; |
219 gfx::Insets client_area_; | 222 gfx::Insets client_area_; |
220 std::vector<gfx::Rect> additional_client_areas_; | 223 std::vector<gfx::Rect> additional_client_areas_; |
221 std::unique_ptr<ServerWindowSurfaceManager> surface_manager_; | 224 std::unique_ptr<ServerWindowSurfaceManager> surface_manager_; |
222 mojom::Cursor cursor_id_; | 225 mojom::Cursor cursor_id_; |
223 mojom::Cursor non_client_cursor_id_; | 226 mojom::Cursor non_client_cursor_id_; |
224 float opacity_; | 227 float opacity_; |
225 bool can_focus_; | 228 bool can_focus_; |
226 gfx::Transform transform_; | 229 gfx::Transform transform_; |
227 ui::TextInputState text_input_state_; | 230 ui::TextInputState text_input_state_; |
231 bool accept_events_; | |
228 | 232 |
229 Properties properties_; | 233 Properties properties_; |
230 | 234 |
231 gfx::Vector2d underlay_offset_; | 235 gfx::Vector2d underlay_offset_; |
232 | 236 |
233 // The hit test for windows extends outside the bounds of the window by this | 237 // The hit test for windows extends outside the bounds of the window by this |
234 // amount. | 238 // amount. |
235 gfx::Insets extended_hit_test_region_; | 239 gfx::Insets extended_hit_test_region_; |
236 | 240 |
237 // Mouse events outside the hit test mask don't hit the window. An empty mask | 241 // Mouse events outside the hit test mask don't hit the window. An empty mask |
238 // means all events miss the window. If null there is no mask. | 242 // means all events miss the window. If null there is no mask. |
239 std::unique_ptr<gfx::Rect> hit_test_mask_; | 243 std::unique_ptr<gfx::Rect> hit_test_mask_; |
240 | 244 |
241 base::ObserverList<ServerWindowObserver> observers_; | 245 base::ObserverList<ServerWindowObserver> observers_; |
242 | 246 |
243 DISALLOW_COPY_AND_ASSIGN(ServerWindow); | 247 DISALLOW_COPY_AND_ASSIGN(ServerWindow); |
244 }; | 248 }; |
245 | 249 |
246 } // namespace ws | 250 } // namespace ws |
247 } // namespace ui | 251 } // namespace ui |
248 | 252 |
249 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ | 253 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ |
OLD | NEW |