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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager_win.cc

Issue 132313003: Remove Chrome Frame code from BrowserAccessibilityManagerWin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/browser/accessibility/browser_accessibility_manager_win.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) 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 "content/browser/accessibility/browser_accessibility_manager_win.h" 5 #include "content/browser/accessibility/browser_accessibility_manager_win.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlapp.h> 8 #include <atlapp.h>
9 #include <atlcom.h> 9 #include <atlcom.h>
10 #include <atlcrack.h> 10 #include <atlcrack.h>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 BrowserAccessibilityManagerWin::BrowserAccessibilityManagerWin( 112 BrowserAccessibilityManagerWin::BrowserAccessibilityManagerWin(
113 HWND parent_hwnd, 113 HWND parent_hwnd,
114 IAccessible* parent_iaccessible, 114 IAccessible* parent_iaccessible,
115 const ui::AXNodeData& src, 115 const ui::AXNodeData& src,
116 BrowserAccessibilityDelegate* delegate, 116 BrowserAccessibilityDelegate* delegate,
117 BrowserAccessibilityFactory* factory) 117 BrowserAccessibilityFactory* factory)
118 : BrowserAccessibilityManager(src, delegate, factory), 118 : BrowserAccessibilityManager(src, delegate, factory),
119 parent_hwnd_(parent_hwnd), 119 parent_hwnd_(parent_hwnd),
120 parent_iaccessible_(parent_iaccessible), 120 parent_iaccessible_(parent_iaccessible),
121 tracked_scroll_object_(NULL), 121 tracked_scroll_object_(NULL),
122 is_chrome_frame_(
123 CommandLine::ForCurrentProcess()->HasSwitch("chrome-frame")),
124 accessible_hwnd_(NULL) { 122 accessible_hwnd_(NULL) {
125 } 123 }
126 124
127 BrowserAccessibilityManagerWin::~BrowserAccessibilityManagerWin() { 125 BrowserAccessibilityManagerWin::~BrowserAccessibilityManagerWin() {
128 if (tracked_scroll_object_) { 126 if (tracked_scroll_object_) {
129 tracked_scroll_object_->Release(); 127 tracked_scroll_object_->Release();
130 tracked_scroll_object_ = NULL; 128 tracked_scroll_object_ = NULL;
131 } 129 }
132 if (accessible_hwnd_) 130 if (accessible_hwnd_)
133 accessible_hwnd_->OnManagerDeleted(); 131 accessible_hwnd_->OnManagerDeleted();
(...skipping 15 matching lines...) Expand all
149 LONG child_id) { 147 LONG child_id) {
150 // Don't fire events if this view isn't hooked up to its parent. 148 // Don't fire events if this view isn't hooked up to its parent.
151 if (!parent_iaccessible()) 149 if (!parent_iaccessible())
152 return; 150 return;
153 151
154 #if defined(USE_AURA) 152 #if defined(USE_AURA)
155 // If this is an Aura build on Win 7 and complete accessibility is 153 // If this is an Aura build on Win 7 and complete accessibility is
156 // enabled, create a fake child HWND to use as the root of the 154 // enabled, create a fake child HWND to use as the root of the
157 // accessibility tree. See comments above AccessibleHWND for details. 155 // accessibility tree. See comments above AccessibleHWND for details.
158 if (BrowserAccessibilityStateImpl::GetInstance()->IsAccessibleBrowser() && 156 if (BrowserAccessibilityStateImpl::GetInstance()->IsAccessibleBrowser() &&
159 !is_chrome_frame_ &&
160 !accessible_hwnd_) { 157 !accessible_hwnd_) {
161 accessible_hwnd_ = new AccessibleHWND(parent_hwnd_, this); 158 accessible_hwnd_ = new AccessibleHWND(parent_hwnd_, this);
162 parent_hwnd_ = accessible_hwnd_->hwnd(); 159 parent_hwnd_ = accessible_hwnd_->hwnd();
163 parent_iaccessible_ = accessible_hwnd_->window_accessible(); 160 parent_iaccessible_ = accessible_hwnd_->window_accessible();
164 } 161 }
165 #endif 162 #endif
166 163
167 ::NotifyWinEvent(event, parent_hwnd(), OBJID_CLIENT, child_id); 164 ::NotifyWinEvent(event, parent_hwnd(), OBJID_CLIENT, child_id);
168 } 165 }
169 166
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // |parent_iaccessible_| are no longer valid either, since they were 313 // |parent_iaccessible_| are no longer valid either, since they were
317 // derived from AccessibleHWND. We don't have to restore them to 314 // derived from AccessibleHWND. We don't have to restore them to
318 // previous values, though, because this should only happen 315 // previous values, though, because this should only happen
319 // during the destruct sequence for this window. 316 // during the destruct sequence for this window.
320 accessible_hwnd_ = NULL; 317 accessible_hwnd_ = NULL;
321 parent_hwnd_ = NULL; 318 parent_hwnd_ = NULL;
322 parent_iaccessible_ = NULL; 319 parent_iaccessible_ = NULL;
323 } 320 }
324 321
325 } // namespace content 322 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_manager_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698