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

Side by Side Diff: ui/views/accessibility/native_view_accessibility_win.cc

Issue 420653003: MacViews: Accessibility bridge (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix double delete. Add NativeViewAccessibilityTest. Created 6 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
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 #include "ui/views/accessibility/native_view_accessibility_win.h" 5 #include "ui/views/accessibility/native_view_accessibility_win.h"
6 6
7 #include <oleacc.h> 7 #include <oleacc.h>
8 #include <UIAutomationClient.h> 8 #include <UIAutomationClient.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 CComObject<NativeViewAccessibilityWin>* instance = NULL; 199 CComObject<NativeViewAccessibilityWin>* instance = NULL;
200 HRESULT hr = CComObject<NativeViewAccessibilityWin>::CreateInstance( 200 HRESULT hr = CComObject<NativeViewAccessibilityWin>::CreateInstance(
201 &instance); 201 &instance);
202 DCHECK(SUCCEEDED(hr)); 202 DCHECK(SUCCEEDED(hr));
203 instance->set_view(view); 203 instance->set_view(view);
204 instance->AddRef(); 204 instance->AddRef();
205 return instance; 205 return instance;
206 } 206 }
207 207
208 NativeViewAccessibilityWin::NativeViewAccessibilityWin() 208 NativeViewAccessibilityWin::NativeViewAccessibilityWin()
209 : view_(NULL), 209 : unique_id_(next_unique_id_++) {
210 unique_id_(next_unique_id_++) {
211 } 210 }
212 211
213 NativeViewAccessibilityWin::~NativeViewAccessibilityWin() { 212 NativeViewAccessibilityWin::~NativeViewAccessibilityWin() {
214 RemoveAlertTarget(); 213 RemoveAlertTarget();
215 } 214 }
216 215
217 void NativeViewAccessibilityWin::NotifyAccessibilityEvent( 216 void NativeViewAccessibilityWin::NotifyAccessibilityEvent(
218 ui::AXEvent event_type) { 217 ui::AXEvent event_type) {
219 if (!view_) 218 if (!view_)
220 return; 219 return;
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 if (view == NULL || view == view_) { 1527 if (view == NULL || view == view_) {
1529 alert_target_view_storage_ids_.erase( 1528 alert_target_view_storage_ids_.erase(
1530 alert_target_view_storage_ids_.begin() + i); 1529 alert_target_view_storage_ids_.begin() + i);
1531 } else { 1530 } else {
1532 ++i; 1531 ++i;
1533 } 1532 }
1534 } 1533 }
1535 } 1534 }
1536 1535
1537 } // namespace views 1536 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698