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