| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/compiler_specific.h" | |
| 15 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 17 #include "base/string16.h" | 16 #include "base/string16.h" |
| 18 #include "ui/aura/aura_export.h" | 17 #include "ui/aura/aura_export.h" |
| 19 #include "ui/aura/client/window_types.h" | 18 #include "ui/aura/client/window_types.h" |
| 20 #include "ui/base/events.h" | 19 #include "ui/base/events.h" |
| 21 #include "ui/base/gestures/gesture_types.h" | 20 #include "ui/base/gestures/gesture_types.h" |
| 22 #include "ui/compositor/layer_animator.h" | 21 #include "ui/compositor/layer_animator.h" |
| 23 #include "ui/compositor/layer_delegate.h" | 22 #include "ui/compositor/layer_delegate.h" |
| 24 #include "ui/compositor/layer_owner.h" | 23 #include "ui/compositor/layer_owner.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 69 |
| 71 DISALLOW_COPY_AND_ASSIGN(TestApi); | 70 DISALLOW_COPY_AND_ASSIGN(TestApi); |
| 72 }; | 71 }; |
| 73 | 72 |
| 74 explicit Window(WindowDelegate* delegate); | 73 explicit Window(WindowDelegate* delegate); |
| 75 virtual ~Window(); | 74 virtual ~Window(); |
| 76 | 75 |
| 77 // Initializes the window. This creates the window's layer. | 76 // Initializes the window. This creates the window's layer. |
| 78 void Init(ui::LayerType layer_type); | 77 void Init(ui::LayerType layer_type); |
| 79 | 78 |
| 80 // Creates a new layer for the window. Erases the layer-owned bounds, so the | |
| 81 // caller may wish to set new bounds and other state on the window/layer. | |
| 82 // Returns the old layer, which can be used for animations. Caller owns the | |
| 83 // memory for the returned layer and must delete it when animation completes. | |
| 84 ui::Layer* RecreateLayer() WARN_UNUSED_RESULT; | |
| 85 | |
| 86 void set_owned_by_parent(bool owned_by_parent) { | 79 void set_owned_by_parent(bool owned_by_parent) { |
| 87 owned_by_parent_ = owned_by_parent; | 80 owned_by_parent_ = owned_by_parent; |
| 88 } | 81 } |
| 89 | 82 |
| 90 // A type is used to identify a class of Windows and customize behavior such | 83 // A type is used to identify a class of Windows and customize behavior such |
| 91 // as event handling and parenting. This field should only be consumed by the | 84 // as event handling and parenting. This field should only be consumed by the |
| 92 // shell -- Aura itself shouldn't contain type-specific logic. | 85 // shell -- Aura itself shouldn't contain type-specific logic. |
| 93 client::WindowType type() const { return type_; } | 86 client::WindowType type() const { return type_; } |
| 94 void SetType(client::WindowType type); | 87 void SetType(client::WindowType type); |
| 95 | 88 |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 }; | 452 }; |
| 460 | 453 |
| 461 std::map<const void*, Value> prop_map_; | 454 std::map<const void*, Value> prop_map_; |
| 462 | 455 |
| 463 DISALLOW_COPY_AND_ASSIGN(Window); | 456 DISALLOW_COPY_AND_ASSIGN(Window); |
| 464 }; | 457 }; |
| 465 | 458 |
| 466 } // namespace aura | 459 } // namespace aura |
| 467 | 460 |
| 468 #endif // UI_AURA_WINDOW_H_ | 461 #endif // UI_AURA_WINDOW_H_ |
| OLD | NEW |