| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_AURA_WINDOW_H_ | 5 #ifndef UI_AURA_WINDOW_H_ |
| 6 #define UI_AURA_WINDOW_H_ | 6 #define UI_AURA_WINDOW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 201 |
| 202 // When set to true, this Window will stop propagation of all events targeted | 202 // When set to true, this Window will stop propagation of all events targeted |
| 203 // at Windows below it in the z-order, but only if this Window has children. | 203 // at Windows below it in the z-order, but only if this Window has children. |
| 204 // This is used to implement lock-screen type functionality where we do not | 204 // This is used to implement lock-screen type functionality where we do not |
| 205 // want events to be sent to running logged-in windows when the lock screen is | 205 // want events to be sent to running logged-in windows when the lock screen is |
| 206 // displayed. | 206 // displayed. |
| 207 void set_stops_event_propagation(bool stops_event_propagation) { | 207 void set_stops_event_propagation(bool stops_event_propagation) { |
| 208 stops_event_propagation_ = stops_event_propagation; | 208 stops_event_propagation_ = stops_event_propagation; |
| 209 } | 209 } |
| 210 | 210 |
| 211 void set_ignore_events(bool ignore_events) { ignore_events_ = ignore_events; } |
| 212 |
| 211 // Returns true if relative-to-this-Window's-origin |local_point| falls | 213 // Returns true if relative-to-this-Window's-origin |local_point| falls |
| 212 // within this Window's bounds. | 214 // within this Window's bounds. |
| 213 bool ContainsPoint(const gfx::Point& local_point); | 215 bool ContainsPoint(const gfx::Point& local_point); |
| 214 | 216 |
| 215 // Returns true if the mouse pointer at relative-to-this-Window's-origin | 217 // Returns true if the mouse pointer at relative-to-this-Window's-origin |
| 216 // |local_point| can trigger an event for this Window. | 218 // |local_point| can trigger an event for this Window. |
| 217 // TODO(beng): A Window can supply a hit-test mask to cause some portions of | 219 // TODO(beng): A Window can supply a hit-test mask to cause some portions of |
| 218 // itself to not trigger events, causing the events to fall through to the | 220 // itself to not trigger events, causing the events to fall through to the |
| 219 // Window behind. | 221 // Window behind. |
| 220 bool HitTest(const gfx::Point& local_point); | 222 bool HitTest(const gfx::Point& local_point); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 335 |
| 334 scoped_ptr<EventFilter> event_filter_; | 336 scoped_ptr<EventFilter> event_filter_; |
| 335 scoped_ptr<LayoutManager> layout_manager_; | 337 scoped_ptr<LayoutManager> layout_manager_; |
| 336 | 338 |
| 337 void* user_data_; | 339 void* user_data_; |
| 338 | 340 |
| 339 // When true, events are not sent to windows behind this one in the z-order, | 341 // When true, events are not sent to windows behind this one in the z-order, |
| 340 // provided this window has children. See set_stops_event_propagation(). | 342 // provided this window has children. See set_stops_event_propagation(). |
| 341 bool stops_event_propagation_; | 343 bool stops_event_propagation_; |
| 342 | 344 |
| 345 // Makes the window pass all events through to any windows behind it. |
| 346 bool ignore_events_; |
| 347 |
| 343 ObserverList<WindowObserver> observers_; | 348 ObserverList<WindowObserver> observers_; |
| 344 | 349 |
| 345 // We're using ViewProp to store the property (for now) instead of | 350 // We're using ViewProp to store the property (for now) instead of |
| 346 // just using std::map because chrome is still using |ViewProp| class | 351 // just using std::map because chrome is still using |ViewProp| class |
| 347 // to create and access property. | 352 // to create and access property. |
| 348 // TODO(oshima): Consolidcate ViewProp and aura::window property | 353 // TODO(oshima): Consolidcate ViewProp and aura::window property |
| 349 // implementation. | 354 // implementation. |
| 350 std::map<const char*, void*> prop_map_; | 355 std::map<const char*, void*> prop_map_; |
| 351 | 356 |
| 352 DISALLOW_COPY_AND_ASSIGN(Window); | 357 DISALLOW_COPY_AND_ASSIGN(Window); |
| 353 }; | 358 }; |
| 354 | 359 |
| 355 } // namespace aura | 360 } // namespace aura |
| 356 | 361 |
| 357 #endif // UI_AURA_WINDOW_H_ | 362 #endif // UI_AURA_WINDOW_H_ |
| OLD | NEW |