Chromium Code Reviews| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 std::string GetName() const; | 144 std::string GetName() const; |
| 145 | 145 |
| 146 void SetTextInputState(const ui::TextInputState& state); | 146 void SetTextInputState(const ui::TextInputState& state); |
| 147 const ui::TextInputState& text_input_state() const { | 147 const ui::TextInputState& text_input_state() const { |
| 148 return text_input_state_; | 148 return text_input_state_; |
| 149 } | 149 } |
| 150 | 150 |
| 151 void set_can_focus(bool can_focus) { can_focus_ = can_focus; } | 151 void set_can_focus(bool can_focus) { can_focus_ = can_focus; } |
| 152 bool can_focus() const { return can_focus_; } | 152 bool can_focus() const { return can_focus_; } |
| 153 | 153 |
| 154 void set_accept_events(bool accept_events) { accept_events_ = accept_events; } | |
|
sky
2016/07/08 20:35:00
can_accept. The reason I'm requesting the 'can' is
riajiang
2016/07/11 15:48:38
Done.
| |
| 155 bool accept_events() const { return accept_events_; } | |
| 156 | |
| 154 // Returns true if this window is attached to a root and all ancestors are | 157 // Returns true if this window is attached to a root and all ancestors are |
| 155 // visible. | 158 // visible. |
| 156 bool IsDrawn() const; | 159 bool IsDrawn() const; |
| 157 | 160 |
| 158 // Called when its appropriate to destroy surfaces scheduled for destruction. | 161 // Called when its appropriate to destroy surfaces scheduled for destruction. |
| 159 void DestroySurfacesScheduledForDestruction(); | 162 void DestroySurfacesScheduledForDestruction(); |
| 160 | 163 |
| 161 const gfx::Insets& extended_hit_test_region() const { | 164 const gfx::Insets& extended_hit_test_region() const { |
| 162 return extended_hit_test_region_; | 165 return extended_hit_test_region_; |
| 163 } | 166 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 gfx::Rect bounds_; | 219 gfx::Rect bounds_; |
| 217 gfx::Insets client_area_; | 220 gfx::Insets client_area_; |
| 218 std::vector<gfx::Rect> additional_client_areas_; | 221 std::vector<gfx::Rect> additional_client_areas_; |
| 219 std::unique_ptr<ServerWindowSurfaceManager> surface_manager_; | 222 std::unique_ptr<ServerWindowSurfaceManager> surface_manager_; |
| 220 mojom::Cursor cursor_id_; | 223 mojom::Cursor cursor_id_; |
| 221 mojom::Cursor non_client_cursor_id_; | 224 mojom::Cursor non_client_cursor_id_; |
| 222 float opacity_; | 225 float opacity_; |
| 223 bool can_focus_; | 226 bool can_focus_; |
| 224 gfx::Transform transform_; | 227 gfx::Transform transform_; |
| 225 ui::TextInputState text_input_state_; | 228 ui::TextInputState text_input_state_; |
| 229 bool accept_events_; | |
| 226 | 230 |
| 227 Properties properties_; | 231 Properties properties_; |
| 228 | 232 |
| 229 gfx::Vector2d underlay_offset_; | 233 gfx::Vector2d underlay_offset_; |
| 230 | 234 |
| 231 // The hit test for windows extends outside the bounds of the window by this | 235 // The hit test for windows extends outside the bounds of the window by this |
| 232 // amount. | 236 // amount. |
| 233 gfx::Insets extended_hit_test_region_; | 237 gfx::Insets extended_hit_test_region_; |
| 234 | 238 |
| 235 // Mouse events outside the hit test mask don't hit the window. An empty mask | 239 // Mouse events outside the hit test mask don't hit the window. An empty mask |
| 236 // means all events miss the window. If null there is no mask. | 240 // means all events miss the window. If null there is no mask. |
| 237 std::unique_ptr<gfx::Rect> hit_test_mask_; | 241 std::unique_ptr<gfx::Rect> hit_test_mask_; |
| 238 | 242 |
| 239 base::ObserverList<ServerWindowObserver> observers_; | 243 base::ObserverList<ServerWindowObserver> observers_; |
| 240 | 244 |
| 241 DISALLOW_COPY_AND_ASSIGN(ServerWindow); | 245 DISALLOW_COPY_AND_ASSIGN(ServerWindow); |
| 242 }; | 246 }; |
| 243 | 247 |
| 244 } // namespace ws | 248 } // namespace ws |
| 245 } // namespace ui | 249 } // namespace ui |
| 246 | 250 |
| 247 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ | 251 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ |
| OLD | NEW |