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

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

Issue 25736004: Fixes use after free caused by delete in RootWindowController (2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Shutdown Created 7 years, 2 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 | « ash/wm/frame_painter.cc ('k') | no next file » | 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>
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Creates a new layer for the window. Erases the layer-owned bounds, so the 73 // Creates a new layer for the window. Erases the layer-owned bounds, so the
74 // caller may wish to set new bounds and other state on the window/layer. 74 // caller may wish to set new bounds and other state on the window/layer.
75 // Returns the old layer, which can be used for animations. Caller owns the 75 // Returns the old layer, which can be used for animations. Caller owns the
76 // memory for the returned layer and must delete it when animation completes. 76 // memory for the returned layer and must delete it when animation completes.
77 // Returns NULL and does not recreate layer if window does not own its layer. 77 // Returns NULL and does not recreate layer if window does not own its layer.
78 ui::Layer* RecreateLayer() WARN_UNUSED_RESULT; 78 ui::Layer* RecreateLayer() WARN_UNUSED_RESULT;
79 79
80 void set_owned_by_parent(bool owned_by_parent) { 80 void set_owned_by_parent(bool owned_by_parent) {
81 owned_by_parent_ = owned_by_parent; 81 owned_by_parent_ = owned_by_parent;
82 } 82 }
83 bool owned_by_parent() const { return owned_by_parent_; }
83 84
84 // A type is used to identify a class of Windows and customize behavior such 85 // A type is used to identify a class of Windows and customize behavior such
85 // as event handling and parenting. This field should only be consumed by the 86 // as event handling and parenting. This field should only be consumed by the
86 // shell -- Aura itself shouldn't contain type-specific logic. 87 // shell -- Aura itself shouldn't contain type-specific logic.
87 client::WindowType type() const { return type_; } 88 client::WindowType type() const { return type_; }
88 void SetType(client::WindowType type); 89 void SetType(client::WindowType type);
89 90
90 int id() const { return id_; } 91 int id() const { return id_; }
91 void set_id(int id) { id_ = id; } 92 void set_id(int id) { id_ = id; }
92 93
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 }; 521 };
521 522
522 std::map<const void*, Value> prop_map_; 523 std::map<const void*, Value> prop_map_;
523 524
524 DISALLOW_COPY_AND_ASSIGN(Window); 525 DISALLOW_COPY_AND_ASSIGN(Window);
525 }; 526 };
526 527
527 } // namespace aura 528 } // namespace aura
528 529
529 #endif // UI_AURA_WINDOW_H_ 530 #endif // UI_AURA_WINDOW_H_
OLDNEW
« no previous file with comments | « ash/wm/frame_painter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698