| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <string> | 10 #include <string> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 int id() const { return id_; } | 64 int id() const { return id_; } |
| 65 void set_id(int id) { id_ = id; } | 65 void set_id(int id) { id_ = id; } |
| 66 | 66 |
| 67 const std::string& name() const { return name_; } | 67 const std::string& name() const { return name_; } |
| 68 void SetName(const std::string& name); | 68 void SetName(const std::string& name); |
| 69 | 69 |
| 70 const string16 title() const { return title_; } | 70 const string16 title() const { return title_; } |
| 71 void set_title(const string16& title) { title_ = title; } | 71 void set_title(const string16& title) { title_ = title; } |
| 72 | 72 |
| 73 bool transparent() const { return transparent_; } |
| 74 void SetTransparent(bool transparent); |
| 75 |
| 73 ui::Layer* layer() { return layer_.get(); } | 76 ui::Layer* layer() { return layer_.get(); } |
| 74 const ui::Layer* layer() const { return layer_.get(); } | 77 const ui::Layer* layer() const { return layer_.get(); } |
| 75 | 78 |
| 76 // Releases the Window's reference to its layer, and returns it. | 79 // Releases the Window's reference to its layer, and returns it. |
| 77 // This is used when you need to animate the presentation of the Window just | 80 // This is used when you need to animate the presentation of the Window just |
| 78 // prior to destroying it. The window can be destroyed soon after calling this | 81 // prior to destroying it. The window can be destroyed soon after calling this |
| 79 // function, and the caller is then responsible for disposing of the layer | 82 // function, and the caller is then responsible for disposing of the layer |
| 80 // once any animation completes. | 83 // once any animation completes. |
| 81 // Note that Window methods generally don't expect a NULL layer, and so this | 84 // Note that Window methods generally don't expect a NULL layer, and so this |
| 82 // function should only be called right before destroying the Window, | 85 // function should only be called right before destroying the Window, |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 // Transient windows. | 337 // Transient windows. |
| 335 Windows transient_children_; | 338 Windows transient_children_; |
| 336 | 339 |
| 337 Window* transient_parent_; | 340 Window* transient_parent_; |
| 338 | 341 |
| 339 int id_; | 342 int id_; |
| 340 std::string name_; | 343 std::string name_; |
| 341 | 344 |
| 342 string16 title_; | 345 string16 title_; |
| 343 | 346 |
| 347 // Whether layer is initialized as non-opaque. |
| 348 bool transparent_; |
| 349 |
| 344 scoped_ptr<EventFilter> event_filter_; | 350 scoped_ptr<EventFilter> event_filter_; |
| 345 scoped_ptr<LayoutManager> layout_manager_; | 351 scoped_ptr<LayoutManager> layout_manager_; |
| 346 | 352 |
| 347 void* user_data_; | 353 void* user_data_; |
| 348 | 354 |
| 349 // When true, events are not sent to windows behind this one in the z-order, | 355 // When true, events are not sent to windows behind this one in the z-order, |
| 350 // provided this window has children. See set_stops_event_propagation(). | 356 // provided this window has children. See set_stops_event_propagation(). |
| 351 bool stops_event_propagation_; | 357 bool stops_event_propagation_; |
| 352 | 358 |
| 353 // Makes the window pass all events through to any windows behind it. | 359 // Makes the window pass all events through to any windows behind it. |
| 354 bool ignore_events_; | 360 bool ignore_events_; |
| 355 | 361 |
| 356 ObserverList<WindowObserver> observers_; | 362 ObserverList<WindowObserver> observers_; |
| 357 | 363 |
| 358 // We're using ViewProp to store the property (for now) instead of | 364 // We're using ViewProp to store the property (for now) instead of |
| 359 // just using std::map because chrome is still using |ViewProp| class | 365 // just using std::map because chrome is still using |ViewProp| class |
| 360 // to create and access property. | 366 // to create and access property. |
| 361 // TODO(oshima): Consolidcate ViewProp and aura::window property | 367 // TODO(oshima): Consolidcate ViewProp and aura::window property |
| 362 // implementation. | 368 // implementation. |
| 363 std::map<const char*, void*> prop_map_; | 369 std::map<const char*, void*> prop_map_; |
| 364 | 370 |
| 365 DISALLOW_COPY_AND_ASSIGN(Window); | 371 DISALLOW_COPY_AND_ASSIGN(Window); |
| 366 }; | 372 }; |
| 367 | 373 |
| 368 } // namespace aura | 374 } // namespace aura |
| 369 | 375 |
| 370 #endif // UI_AURA_WINDOW_H_ | 376 #endif // UI_AURA_WINDOW_H_ |
| OLD | NEW |