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

Side by Side Diff: mojo/services/view_manager/node.h

Issue 296133012: Some security checks around destruction/setting bounds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 MOJO_SERVICES_VIEW_MANAGER_NODE_H_ 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_NODE_H_
6 #define MOJO_SERVICES_VIEW_MANAGER_NODE_H_ 6 #define MOJO_SERVICES_VIEW_MANAGER_NODE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 21 matching lines...) Expand all
32 void set_view_id(const ViewId& view_id) { view_id_ = view_id; } 32 void set_view_id(const ViewId& view_id) { view_id_ = view_id; }
33 const ViewId& view_id() const { return view_id_; } 33 const ViewId& view_id() const { return view_id_; }
34 34
35 const NodeId& id() const { return id_; } 35 const NodeId& id() const { return id_; }
36 36
37 void Add(Node* child); 37 void Add(Node* child);
38 void Remove(Node* child); 38 void Remove(Node* child);
39 39
40 aura::Window* window() { return &window_; } 40 aura::Window* window() { return &window_; }
41 41
42 gfx::Rect bounds() const { return window_.bounds(); }
sky 2014/05/23 13:16:29 const gfx::Rect&
43
42 const Node* GetParent() const; 44 const Node* GetParent() const;
43 Node* GetParent() { 45 Node* GetParent() {
44 return const_cast<Node*>(const_cast<const Node*>(this)->GetParent()); 46 return const_cast<Node*>(const_cast<const Node*>(this)->GetParent());
45 } 47 }
46 48
47 const Node* GetRoot() const; 49 const Node* GetRoot() const;
48 Node* GetRoot() { 50 Node* GetRoot() {
49 return const_cast<Node*>(const_cast<const Node*>(this)->GetRoot()); 51 return const_cast<Node*>(const_cast<const Node*>(this)->GetRoot());
50 } 52 }
51 53
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 aura::Window window_; 97 aura::Window window_;
96 98
97 DISALLOW_COPY_AND_ASSIGN(Node); 99 DISALLOW_COPY_AND_ASSIGN(Node);
98 }; 100 };
99 101
100 } // namespace service 102 } // namespace service
101 } // namespace view_manager 103 } // namespace view_manager
102 } // namespace mojo 104 } // namespace mojo
103 105
104 #endif // MOJO_SERVICES_VIEW_MANAGER_NODE_H_ 106 #endif // MOJO_SERVICES_VIEW_MANAGER_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698