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

Side by Side Diff: views/view.cc

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
« no previous file with comments | « views/focus/view_storage.cc ('k') | views/view_unittest.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 #include "views/view.h" 5 #include "views/view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 int View::GetIndexOf(const View* view) const { 211 int View::GetIndexOf(const View* view) const {
212 ViewVector::const_iterator it = std::find(children_.begin(), children_.end(), 212 ViewVector::const_iterator it = std::find(children_.begin(), children_.end(),
213 view); 213 view);
214 return it != children_.end() ? it - children_.begin() : -1; 214 return it != children_.end() ? it - children_.begin() : -1;
215 } 215 }
216 216
217 // TODO(beng): remove 217 // TODO(beng): remove
218 const Window* View::GetWindow() const { 218 const Window* View::GetWindow() const {
219 const Widget* widget = GetWidget(); 219 const Widget* widget = GetWidget();
220 return widget ? widget->GetWindow() : NULL; 220 return widget ? widget->GetContainingWindow() : NULL;
221 } 221 }
222 222
223 // TODO(beng): remove 223 // TODO(beng): remove
224 Window* View::GetWindow() { 224 Window* View::GetWindow() {
225 return const_cast<Window*>(const_cast<const View*>(this)->GetWindow()); 225 return const_cast<Window*>(const_cast<const View*>(this)->GetWindow());
226 } 226 }
227 227
228 // TODO(beng): remove 228 // TODO(beng): remove
229 bool View::ContainsNativeView(gfx::NativeView native_view) const { 229 bool View::ContainsNativeView(gfx::NativeView native_view) const {
230 for (int i = 0, count = child_count(); i < count; ++i) { 230 for (int i = 0, count = child_count(); i < count; ++i) {
(...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after
1923 result.append(GetChildViewAt(i)->PrintViewGraph(false)); 1923 result.append(GetChildViewAt(i)->PrintViewGraph(false));
1924 1924
1925 if (first) 1925 if (first)
1926 result.append("}\n"); 1926 result.append("}\n");
1927 1927
1928 return result; 1928 return result;
1929 } 1929 }
1930 #endif 1930 #endif
1931 1931
1932 } // namespace views 1932 } // namespace views
OLDNEW
« no previous file with comments | « views/focus/view_storage.cc ('k') | views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698