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

Side by Side Diff: content/browser/renderer_host/legacy_render_widget_host_win.cc

Issue 1762143002: Use unique IDs for accessibility nodes on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix null obj deref in DCHECK Created 4 years, 9 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/renderer_host/legacy_render_widget_host_win.h" 5 #include "content/browser/renderer_host/legacy_render_widget_host_win.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "content/browser/accessibility/browser_accessibility_manager_win.h" 10 #include "content/browser/accessibility/browser_accessibility_manager_win.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 if (!rwhi) 174 if (!rwhi)
175 return static_cast<LRESULT>(0L); 175 return static_cast<LRESULT>(0L);
176 176
177 BrowserAccessibilityManagerWin* manager = 177 BrowserAccessibilityManagerWin* manager =
178 static_cast<BrowserAccessibilityManagerWin*>( 178 static_cast<BrowserAccessibilityManagerWin*>(
179 rwhi->GetRootBrowserAccessibilityManager()); 179 rwhi->GetRootBrowserAccessibilityManager());
180 if (!manager) 180 if (!manager)
181 return static_cast<LRESULT>(0L); 181 return static_cast<LRESULT>(0L);
182 182
183 base::win::ScopedComPtr<IAccessible> root( 183 base::win::ScopedComPtr<IAccessible> root(
184 manager->GetRoot()->ToBrowserAccessibilityWin()); 184 ToBrowserAccessibilityWin(manager->GetRoot()));
185 return LresultFromObject(IID_IAccessible, w_param, 185 return LresultFromObject(IID_IAccessible, w_param,
186 static_cast<IAccessible*>(root.Detach())); 186 static_cast<IAccessible*>(root.Detach()));
187 } 187 }
188 188
189 // We send keyboard/mouse/touch messages to the parent window via SendMessage. 189 // We send keyboard/mouse/touch messages to the parent window via SendMessage.
190 // While this works, this has the side effect of converting input messages into 190 // While this works, this has the side effect of converting input messages into
191 // sent messages which changes their priority and could technically result 191 // sent messages which changes their priority and could technically result
192 // in these messages starving other messages in the queue. Additionally 192 // in these messages starving other messages in the queue. Additionally
193 // keyboard/mouse hooks would not see these messages. The alternative approach 193 // keyboard/mouse hooks would not see these messages. The alternative approach
194 // is to set and release capture as needed on the parent to ensure that it 194 // is to set and release capture as needed on the parent to ensure that it
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 direct_manipulation_helper_->Activate(hwnd()); 404 direct_manipulation_helper_->Activate(hwnd());
405 } else if (window_pos->flags & SWP_HIDEWINDOW) { 405 } else if (window_pos->flags & SWP_HIDEWINDOW) {
406 direct_manipulation_helper_->Deactivate(hwnd()); 406 direct_manipulation_helper_->Deactivate(hwnd());
407 } 407 }
408 } 408 }
409 SetMsgHandled(FALSE); 409 SetMsgHandled(FALSE);
410 return 0; 410 return 0;
411 } 411 }
412 412
413 } // namespace content 413 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698