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

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

Issue 8136005: Makes visbility inherited. That is, in order for a window to be (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk Created 9 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 | « ui/aura/desktop.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <vector> 9 #include <vector>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 const std::string& name() const { return name_; } 56 const std::string& name() const { return name_; }
57 void set_name(const std::string& name) { name_ = name; } 57 void set_name(const std::string& name) { name_ = name; }
58 58
59 ui::Layer* layer() { return layer_.get(); } 59 ui::Layer* layer() { return layer_.get(); }
60 const ui::Layer* layer() const { return layer_.get(); } 60 const ui::Layer* layer() const { return layer_.get(); }
61 61
62 // Changes the visibility of the window. 62 // Changes the visibility of the window.
63 void Show(); 63 void Show();
64 void Hide(); 64 void Hide();
65 bool visible() const { return visible_; } 65 // Returns true if this window and all its ancestors are visible.
66 bool IsVisible() const;
66 67
67 // Assigns a LayoutManager to size and place child windows. 68 // Assigns a LayoutManager to size and place child windows.
68 // The Window takes ownership of the LayoutManager. 69 // The Window takes ownership of the LayoutManager.
69 void SetLayoutManager(LayoutManager* layout_manager); 70 void SetLayoutManager(LayoutManager* layout_manager);
70 71
71 // Changes the bounds of the window. 72 // Changes the bounds of the window.
72 void SetBounds(const gfx::Rect& new_bounds); 73 void SetBounds(const gfx::Rect& new_bounds);
73 const gfx::Rect& bounds() const; 74 const gfx::Rect& bounds() const;
74 75
75 // Marks the a portion of window as needing to be painted. 76 // Marks the a portion of window as needing to be painted.
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 void SetVisible(bool visible); 173 void SetVisible(bool visible);
173 174
174 // Schedules a paint for the Window's entire bounds. 175 // Schedules a paint for the Window's entire bounds.
175 void SchedulePaint(); 176 void SchedulePaint();
176 177
177 // Overridden from ui::LayerDelegate: 178 // Overridden from ui::LayerDelegate:
178 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; 179 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE;
179 180
180 WindowDelegate* delegate_; 181 WindowDelegate* delegate_;
181 182
182 bool visible_;
183
184 scoped_ptr<ui::Layer> layer_; 183 scoped_ptr<ui::Layer> layer_;
185 184
186 // The Window's parent. 185 // The Window's parent.
187 // TODO(beng): Implement NULL-ness for toplevels. 186 // TODO(beng): Implement NULL-ness for toplevels.
188 Window* parent_; 187 Window* parent_;
189 188
190 // Child windows. Topmost is last. 189 // Child windows. Topmost is last.
191 Windows children_; 190 Windows children_;
192 191
193 int id_; 192 int id_;
194 std::string name_; 193 std::string name_;
195 194
196 scoped_ptr<EventFilter> event_filter_; 195 scoped_ptr<EventFilter> event_filter_;
197 scoped_ptr<LayoutManager> layout_manager_; 196 scoped_ptr<LayoutManager> layout_manager_;
198 197
199 void* user_data_; 198 void* user_data_;
200 199
201 // When true, events are not sent to windows behind this one in the z-order, 200 // When true, events are not sent to windows behind this one in the z-order,
202 // provided this window has children. See set_consumes_events(). 201 // provided this window has children. See set_consumes_events().
203 bool consumes_events_; 202 bool consumes_events_;
204 203
205 DISALLOW_COPY_AND_ASSIGN(Window); 204 DISALLOW_COPY_AND_ASSIGN(Window);
206 }; 205 };
207 206
208 } // namespace aura 207 } // namespace aura
209 208
210 #endif // UI_AURA_WINDOW_H_ 209 #endif // UI_AURA_WINDOW_H_
OLDNEW
« no previous file with comments | « ui/aura/desktop.cc ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698