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

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

Issue 10795013: Rename bounds accessors to be intuitive and consistent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 | « content/port/browser/render_widget_host_view_port.h ('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>
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void Show(); 125 void Show();
126 void Hide(); 126 void Hide();
127 // Returns true if this window and all its ancestors are visible. 127 // Returns true if this window and all its ancestors are visible.
128 bool IsVisible() const; 128 bool IsVisible() const;
129 // Returns the visibility requested by this window. IsVisible() takes into 129 // Returns the visibility requested by this window. IsVisible() takes into
130 // account the visibility of the layer and ancestors, where as this tracks 130 // account the visibility of the layer and ancestors, where as this tracks
131 // whether Show() without a Hide() has been invoked. 131 // whether Show() without a Hide() has been invoked.
132 bool TargetVisibility() const { return visible_; } 132 bool TargetVisibility() const { return visible_; }
133 133
134 // Returns the window's bounds in root window's coordinates. 134 // Returns the window's bounds in root window's coordinates.
135 gfx::Rect GetRootWindowBounds() const; 135 gfx::Rect GetBoundsInRootWindow() const;
136 136
137 // Returns the window's bounds in screen coordinates. 137 // Returns the window's bounds in screen coordinates.
138 // How the root window's coordinates is mapped to screen's coordinates 138 // How the root window's coordinates is mapped to screen's coordinates
139 // is platform dependent and defined in the implementation of the 139 // is platform dependent and defined in the implementation of the
140 // |aura::client::ScreenPositionClient| interface. 140 // |aura::client::ScreenPositionClient| interface.
141 gfx::Rect GetScreenBounds() const; 141 gfx::Rect GetBoundsInScreen() const;
142 142
143 virtual void SetTransform(const ui::Transform& transform); 143 virtual void SetTransform(const ui::Transform& transform);
144 144
145 // Assigns a LayoutManager to size and place child windows. 145 // Assigns a LayoutManager to size and place child windows.
146 // The Window takes ownership of the LayoutManager. 146 // The Window takes ownership of the LayoutManager.
147 void SetLayoutManager(LayoutManager* layout_manager); 147 void SetLayoutManager(LayoutManager* layout_manager);
148 LayoutManager* layout_manager() { return layout_manager_.get(); } 148 LayoutManager* layout_manager() { return layout_manager_.get(); }
149 149
150 // Changes the bounds of the window. If present, the window's parent's 150 // Changes the bounds of the window. If present, the window's parent's
151 // LayoutManager may adjust the bounds. 151 // LayoutManager may adjust the bounds.
152 void SetBounds(const gfx::Rect& new_bounds); 152 void SetBounds(const gfx::Rect& new_bounds);
153 153
154 // Changes the bounds of the window in the screen coordintates. 154 // Changes the bounds of the window in the screen coordintates.
155 // If present, the window's parent's LayoutManager may adjust the bounds. 155 // If present, the window's parent's LayoutManager may adjust the bounds.
156 void SetScreenBounds(const gfx::Rect& new_bounds_in_screen_coords); 156 void SetBoundsInScreen(const gfx::Rect& new_bounds_in_screen_coords);
157 157
158 // Returns the target bounds of the window. If the window's layer is 158 // Returns the target bounds of the window. If the window's layer is
159 // not animating, it simply returns the current bounds. 159 // not animating, it simply returns the current bounds.
160 gfx::Rect GetTargetBounds() const; 160 gfx::Rect GetTargetBounds() const;
161 161
162 // Marks the a portion of window as needing to be painted. 162 // Marks the a portion of window as needing to be painted.
163 void SchedulePaintInRect(const gfx::Rect& rect); 163 void SchedulePaintInRect(const gfx::Rect& rect);
164 164
165 // Assigns a new external texture to the window's layer. 165 // Assigns a new external texture to the window's layer.
166 void SetExternalTexture(ui::Texture* texture); 166 void SetExternalTexture(ui::Texture* texture);
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 // SetVisbile(false). 485 // SetVisbile(false).
486 // TODO(xiyuan): Remove this when http://crbug.com/134507 is resolved. 486 // TODO(xiyuan): Remove this when http://crbug.com/134507 is resolved.
487 bool in_set_visible_call_; 487 bool in_set_visible_call_;
488 488
489 DISALLOW_COPY_AND_ASSIGN(Window); 489 DISALLOW_COPY_AND_ASSIGN(Window);
490 }; 490 };
491 491
492 } // namespace aura 492 } // namespace aura
493 493
494 #endif // UI_AURA_WINDOW_H_ 494 #endif // UI_AURA_WINDOW_H_
OLDNEW
« no previous file with comments | « content/port/browser/render_widget_host_view_port.h ('k') | ui/aura/window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698