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_can_accept_events(bool can_accept_events) { | |
msw
2016/07/12 22:07:23
optional nit for one-liner:
void set_can_accept_
riajiang
2016/07/13 00:01:46
Done.
| |
155 can_accept_events_ = can_accept_events; | |
156 } | |
157 bool can_accept_events() const { return can_accept_events_; } | |
158 | |
154 // Returns true if this window is attached to a root and all ancestors are | 159 // Returns true if this window is attached to a root and all ancestors are |
155 // visible. | 160 // visible. |
156 bool IsDrawn() const; | 161 bool IsDrawn() const; |
157 | 162 |
158 // Called when its appropriate to destroy surfaces scheduled for destruction. | 163 // Called when its appropriate to destroy surfaces scheduled for destruction. |
159 void DestroySurfacesScheduledForDestruction(); | 164 void DestroySurfacesScheduledForDestruction(); |
160 | 165 |
161 const gfx::Insets& extended_hit_test_region() const { | 166 const gfx::Insets& extended_hit_test_region() const { |
162 return extended_hit_test_region_; | 167 return extended_hit_test_region_; |
163 } | 168 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
216 gfx::Rect bounds_; | 221 gfx::Rect bounds_; |
217 gfx::Insets client_area_; | 222 gfx::Insets client_area_; |
218 std::vector<gfx::Rect> additional_client_areas_; | 223 std::vector<gfx::Rect> additional_client_areas_; |
219 std::unique_ptr<ServerWindowSurfaceManager> surface_manager_; | 224 std::unique_ptr<ServerWindowSurfaceManager> surface_manager_; |
220 mojom::Cursor cursor_id_; | 225 mojom::Cursor cursor_id_; |
221 mojom::Cursor non_client_cursor_id_; | 226 mojom::Cursor non_client_cursor_id_; |
222 float opacity_; | 227 float opacity_; |
223 bool can_focus_; | 228 bool can_focus_; |
224 gfx::Transform transform_; | 229 gfx::Transform transform_; |
225 ui::TextInputState text_input_state_; | 230 ui::TextInputState text_input_state_; |
231 bool can_accept_events_; | |
msw
2016/07/12 22:07:23
nit: order just after can_focus_; optionally init
riajiang
2016/07/13 00:01:46
Moved to be after can_focus_. Since can_focus_ is
msw
2016/07/13 01:04:19
Acknowledged.
| |
226 | 232 |
227 Properties properties_; | 233 Properties properties_; |
228 | 234 |
229 gfx::Vector2d underlay_offset_; | 235 gfx::Vector2d underlay_offset_; |
230 | 236 |
231 // 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 |
232 // amount. | 238 // amount. |
233 gfx::Insets extended_hit_test_region_; | 239 gfx::Insets extended_hit_test_region_; |
234 | 240 |
235 // 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 |
236 // 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. |
237 std::unique_ptr<gfx::Rect> hit_test_mask_; | 243 std::unique_ptr<gfx::Rect> hit_test_mask_; |
238 | 244 |
239 base::ObserverList<ServerWindowObserver> observers_; | 245 base::ObserverList<ServerWindowObserver> observers_; |
240 | 246 |
241 DISALLOW_COPY_AND_ASSIGN(ServerWindow); | 247 DISALLOW_COPY_AND_ASSIGN(ServerWindow); |
242 }; | 248 }; |
243 | 249 |
244 } // namespace ws | 250 } // namespace ws |
245 } // namespace ui | 251 } // namespace ui |
246 | 252 |
247 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ | 253 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ |
OLD | NEW |