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

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

Issue 3202003: Some minor fixes to remove unnecessary includes and do fwd declaration instea... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | « chrome/browser/views/accessible_view_helper.h ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/views/accessible_view_helper.h" 5 #include "chrome/browser/views/accessible_view_helper.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "chrome/browser/accessibility_events.h" 8 #include "chrome/browser/accessibility_events.h"
9 #include "chrome/browser/profile.h" 9 #include "chrome/browser/profile.h"
10 #include "chrome/browser/views/accessibility_event_router_views.h"
10 #include "chrome/common/notification_service.h" 11 #include "chrome/common/notification_service.h"
11 #include "views/widget/widget.h" 12 #include "views/widget/widget.h"
12 13 #include "views/view.h"
13 using views::View;
14 14
15 AccessibleViewHelper::AccessibleViewHelper( 15 AccessibleViewHelper::AccessibleViewHelper(
16 View* view_tree, Profile* profile) 16 views::View* view_tree, Profile* profile)
17 : accessibility_event_router_(AccessibilityEventRouterViews::GetInstance()), 17 : accessibility_event_router_(AccessibilityEventRouterViews::GetInstance()),
18 profile_(profile), 18 profile_(profile),
19 view_tree_(view_tree) { 19 view_tree_(view_tree) {
20 if (!accessibility_event_router_->AddViewTree(view_tree_, profile)) 20 if (!accessibility_event_router_->AddViewTree(view_tree_, profile))
21 view_tree_ = NULL; 21 view_tree_ = NULL;
22 22
23 #if defined(OS_LINUX) 23 #if defined(OS_LINUX)
24 GtkWidget* widget = view_tree->GetWidget()->GetNativeView(); 24 GtkWidget* widget = view_tree->GetWidget()->GetNativeView();
25 widget_helper_.reset(new AccessibleWidgetHelper(widget, profile)); 25 widget_helper_.reset(new AccessibleWidgetHelper(widget, profile));
26 #endif 26 #endif
(...skipping 19 matching lines...) Expand all
46 void AccessibleViewHelper::SendOpenWindowNotification( 46 void AccessibleViewHelper::SendOpenWindowNotification(
47 const std::string& window_title) { 47 const std::string& window_title) {
48 window_title_ = window_title; 48 window_title_ = window_title;
49 AccessibilityWindowInfo info(profile_, window_title); 49 AccessibilityWindowInfo info(profile_, window_title);
50 NotificationService::current()->Notify( 50 NotificationService::current()->Notify(
51 NotificationType::ACCESSIBILITY_WINDOW_OPENED, 51 NotificationType::ACCESSIBILITY_WINDOW_OPENED,
52 Source<Profile>(profile_), 52 Source<Profile>(profile_),
53 Details<AccessibilityWindowInfo>(&info)); 53 Details<AccessibilityWindowInfo>(&info));
54 } 54 }
55 55
56 void AccessibleViewHelper::IgnoreView(View* view) { 56 void AccessibleViewHelper::IgnoreView(views::View* view) {
57 if (!view_tree_) 57 if (!view_tree_)
58 return; 58 return;
59 59
60 accessibility_event_router_->IgnoreView(view); 60 accessibility_event_router_->IgnoreView(view);
61 managed_views_.push_back(view); 61 managed_views_.push_back(view);
62 } 62 }
63 63
64 void AccessibleViewHelper::SetViewName(View* view, std::string name) { 64 void AccessibleViewHelper::SetViewName(views::View* view, std::string name) {
65 if (!view_tree_) 65 if (!view_tree_)
66 return; 66 return;
67 67
68 accessibility_event_router_->SetViewName(view, name); 68 accessibility_event_router_->SetViewName(view, name);
69 managed_views_.push_back(view); 69 managed_views_.push_back(view);
70 } 70 }
71 71
72 void AccessibleViewHelper::SetViewName(View* view, int string_id) { 72 void AccessibleViewHelper::SetViewName(views::View* view, int string_id) {
73 if (!view_tree_) 73 if (!view_tree_)
74 return; 74 return;
75 75
76 std::string name = l10n_util::GetStringUTF8(string_id); 76 std::string name = l10n_util::GetStringUTF8(string_id);
77 accessibility_event_router_->SetViewName(view, name); 77 accessibility_event_router_->SetViewName(view, name);
78 managed_views_.push_back(view); 78 managed_views_.push_back(view);
79 } 79 }
OLDNEW
« no previous file with comments | « chrome/browser/views/accessible_view_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698