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

Side by Side Diff: chrome/browser/ui/views/accessible_view_helper.cc

Issue 6452011: Rework tree APIs to reflect Google style and more const-correctness.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 (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 "chrome/browser/ui/views/accessible_view_helper.h" 5 #include "chrome/browser/ui/views/accessible_view_helper.h"
6 6
7 #include "chrome/browser/accessibility_events.h" 7 #include "chrome/browser/accessibility_events.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/views/accessibility_event_router_views.h" 9 #include "chrome/browser/ui/views/accessibility_event_router_views.h"
10 #include "chrome/common/notification_service.h" 10 #include "chrome/common/notification_service.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 void AccessibleViewHelper::SetViewName(views::View* view, int string_id) { 73 void AccessibleViewHelper::SetViewName(views::View* view, int string_id) {
74 const std::string name = l10n_util::GetStringUTF8(string_id); 74 const std::string name = l10n_util::GetStringUTF8(string_id);
75 SetViewName(view, name); 75 SetViewName(view, name);
76 } 76 }
77 77
78 gfx::NativeView AccessibleViewHelper::GetNativeView(views::View* view) const { 78 gfx::NativeView AccessibleViewHelper::GetNativeView(views::View* view) const {
79 if (view->GetClassName() == views::NativeViewHost::kViewClassName) 79 if (view->GetClassName() == views::NativeViewHost::kViewClassName)
80 return static_cast<views::NativeViewHost*>(view)->native_view(); 80 return static_cast<views::NativeViewHost*>(view)->native_view();
81 81
82 for (int i = 0; i < view->GetChildViewCount(); i++) { 82 for (size_t i = 0; i < view->child_count(); i++) {
83 gfx::NativeView native_view = GetNativeView(view->GetChildViewAt(i)); 83 gfx::NativeView native_view = GetNativeView(view->GetChildViewAt(i));
84 if (native_view) 84 if (native_view)
85 return native_view; 85 return native_view;
86 } 86 }
87 87
88 return NULL; 88 return NULL;
89 } 89 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698