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

Side by Side Diff: chrome/browser/browser_accessibility_manager_win.cc

Issue 3295005: Fix a chrome browser crash which occurs when launched as part of chrome frame... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 3 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 | « no previous file | 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/browser_accessibility_manager_win.h" 5 #include "chrome/browser/browser_accessibility_manager_win.h"
6 6
7 #include "chrome/browser/browser_accessibility_win.h" 7 #include "chrome/browser/browser_accessibility_win.h"
8 #include "chrome/browser/renderer_host/render_process_host.h" 8 #include "chrome/browser/renderer_host/render_process_host.h"
9 #include "chrome/browser/renderer_host/render_view_host.h" 9 #include "chrome/browser/renderer_host/render_view_host.h"
10 #include "chrome/common/render_messages.h" 10 #include "chrome/common/render_messages.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 BrowserAccessibility* BrowserAccessibilityManager::UpdateTree( 152 BrowserAccessibility* BrowserAccessibilityManager::UpdateTree(
153 const webkit_glue::WebAccessibility& acc_obj) { 153 const webkit_glue::WebAccessibility& acc_obj) {
154 base::hash_map<int, LONG>::iterator iter = 154 base::hash_map<int, LONG>::iterator iter =
155 renderer_id_to_child_id_map_.find(acc_obj.id); 155 renderer_id_to_child_id_map_.find(acc_obj.id);
156 if (iter == renderer_id_to_child_id_map_.end()) 156 if (iter == renderer_id_to_child_id_map_.end())
157 return NULL; 157 return NULL;
158 158
159 LONG child_id = iter->second; 159 LONG child_id = iter->second;
160 BrowserAccessibility* old_browser_acc = GetFromChildID(child_id); 160 BrowserAccessibility* old_browser_acc = GetFromChildID(child_id);
161 if (!old_browser_acc)
162 return NULL;
161 163
162 if (old_browser_acc->GetChildCount() == 0 && acc_obj.children.size() == 0) { 164 if (old_browser_acc->GetChildCount() == 0 && acc_obj.children.size() == 0) {
163 // Reinitialize the BrowserAccessibility if there are no children to update. 165 // Reinitialize the BrowserAccessibility if there are no children to update.
164 old_browser_acc->Initialize( 166 old_browser_acc->Initialize(
165 this, 167 this,
166 old_browser_acc->GetParent(), 168 old_browser_acc->GetParent(),
167 child_id, 169 child_id,
168 old_browser_acc->index_in_parent(), 170 old_browser_acc->index_in_parent(),
169 acc_obj); 171 acc_obj);
170 172
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if ((src.state >> WebAccessibility::STATE_FOCUSED) & 1) 219 if ((src.state >> WebAccessibility::STATE_FOCUSED) & 1)
218 focus_ = instance; 220 focus_ = instance;
219 for (int i = 0; i < static_cast<int>(src.children.size()); ++i) { 221 for (int i = 0; i < static_cast<int>(src.children.size()); ++i) {
220 BrowserAccessibility* child = CreateAccessibilityTree( 222 BrowserAccessibility* child = CreateAccessibilityTree(
221 instance, GetNextChildID(), src.children[i], i); 223 instance, GetNextChildID(), src.children[i], i);
222 instance->AddChild(child); 224 instance->AddChild(child);
223 } 225 }
224 226
225 return instance; 227 return instance;
226 } 228 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698