Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: ui/aura/window.h

Issue 121773003: Makes Window::Init take a WindowLayerType instead of LayerType. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge to master Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/test/test_windows.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 #include "ui/aura/aura_export.h" 17 #include "ui/aura/aura_export.h"
18 #include "ui/aura/window_layer_type.h" 18 #include "ui/aura/window_layer_type.h"
19 #include "ui/aura/window_observer.h" 19 #include "ui/aura/window_observer.h"
20 #include "ui/compositor/layer_animator.h" 20 #include "ui/compositor/layer_animator.h"
21 #include "ui/compositor/layer_delegate.h" 21 #include "ui/compositor/layer_delegate.h"
22 #include "ui/compositor/layer_owner.h" 22 #include "ui/compositor/layer_owner.h"
23 #include "ui/compositor/layer_type.h"
24 #include "ui/events/event_constants.h" 23 #include "ui/events/event_constants.h"
25 #include "ui/events/event_target.h" 24 #include "ui/events/event_target.h"
26 #include "ui/events/event_targeter.h" 25 #include "ui/events/event_targeter.h"
27 #include "ui/events/gestures/gesture_types.h" 26 #include "ui/events/gestures/gesture_types.h"
28 #include "ui/gfx/insets.h" 27 #include "ui/gfx/insets.h"
29 #include "ui/gfx/native_widget_types.h" 28 #include "ui/gfx/native_widget_types.h"
30 #include "ui/gfx/rect.h" 29 #include "ui/gfx/rect.h"
31 #include "ui/wm/public/window_types.h" 30 #include "ui/wm/public/window_types.h"
32 31
33 namespace gfx { 32 namespace gfx {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 STACK_ABOVE, 78 STACK_ABOVE,
80 STACK_BELOW 79 STACK_BELOW
81 }; 80 };
82 81
83 typedef std::vector<Window*> Windows; 82 typedef std::vector<Window*> Windows;
84 83
85 explicit Window(WindowDelegate* delegate); 84 explicit Window(WindowDelegate* delegate);
86 virtual ~Window(); 85 virtual ~Window();
87 86
88 // Initializes the window. This creates the window's layer. 87 // Initializes the window. This creates the window's layer.
89 void Init(ui::LayerType layer_type); 88 void Init(WindowLayerType layer_type);
90
91 // TODO(sky): replace other Init() with this once m32 is more baked.
92 void InitWithWindowLayerType(WindowLayerType layer_type);
93 89
94 // Creates a new layer for the window. Erases the layer-owned bounds, so the 90 // Creates a new layer for the window. Erases the layer-owned bounds, so the
95 // caller may wish to set new bounds and other state on the window/layer. 91 // caller may wish to set new bounds and other state on the window/layer.
96 // Returns the old layer, which can be used for animations. Caller owns the 92 // Returns the old layer, which can be used for animations. Caller owns the
97 // memory for the returned layer and must delete it when animation completes. 93 // memory for the returned layer and must delete it when animation completes.
98 // Returns NULL and does not recreate layer if window does not own its layer. 94 // Returns NULL and does not recreate layer if window does not own its layer.
99 ui::Layer* RecreateLayer() WARN_UNUSED_RESULT; 95 ui::Layer* RecreateLayer() WARN_UNUSED_RESULT;
100 96
101 void set_owned_by_parent(bool owned_by_parent) { 97 void set_owned_by_parent(bool owned_by_parent) {
102 owned_by_parent_ = owned_by_parent; 98 owned_by_parent_ = owned_by_parent;
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 }; 575 };
580 576
581 std::map<const void*, Value> prop_map_; 577 std::map<const void*, Value> prop_map_;
582 578
583 DISALLOW_COPY_AND_ASSIGN(Window); 579 DISALLOW_COPY_AND_ASSIGN(Window);
584 }; 580 };
585 581
586 } // namespace aura 582 } // namespace aura
587 583
588 #endif // UI_AURA_WINDOW_H_ 584 #endif // UI_AURA_WINDOW_H_
OLDNEW
« no previous file with comments | « ui/aura/test/test_windows.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698