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

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

Issue 2873683003: Use BrowserAccessibilityComWin::Destroy to clear delegate and owner. (Closed)
Patch Set: simple Created 3 years, 7 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
« no previous file with comments | « content/browser/accessibility/browser_accessibility_com_win.cc ('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_win.h" 5 #include "content/browser/accessibility/browser_accessibility_win.h"
6 6
7 #include "ui/base/win/atl_module.h" 7 #include "ui/base/win/atl_module.h"
8 8
9 namespace content { 9 namespace content {
10 10
(...skipping 18 matching lines...) Expand all
29 BrowserAccessibilityWin::~BrowserAccessibilityWin() {} 29 BrowserAccessibilityWin::~BrowserAccessibilityWin() {}
30 30
31 void BrowserAccessibilityWin::UpdatePlatformAttributes() { 31 void BrowserAccessibilityWin::UpdatePlatformAttributes() {
32 GetCOM()->UpdateStep1ComputeWinAttributes(); 32 GetCOM()->UpdateStep1ComputeWinAttributes();
33 GetCOM()->UpdateStep2ComputeHypertext(); 33 GetCOM()->UpdateStep2ComputeHypertext();
34 GetCOM()->UpdateStep3FireEvents(false); 34 GetCOM()->UpdateStep3FireEvents(false);
35 } 35 }
36 36
37 void BrowserAccessibilityWin::Destroy() { 37 void BrowserAccessibilityWin::Destroy() {
38 if (browser_accessibility_com_) { 38 if (browser_accessibility_com_) {
39 browser_accessibility_com_->SetOwner(nullptr); 39 browser_accessibility_com_->Destroy();
40 // TODO(dougt) AXPlatformNode::Reset
41 browser_accessibility_com_->Init(nullptr);
42 browser_accessibility_com_->Release();
43 browser_accessibility_com_ = nullptr; 40 browser_accessibility_com_ = nullptr;
44 } 41 }
45 BrowserAccessibility::Destroy(); 42 BrowserAccessibility::Destroy();
46 } 43 }
47 44
48 void BrowserAccessibilityWin::OnSubtreeWillBeDeleted() { 45 void BrowserAccessibilityWin::OnSubtreeWillBeDeleted() {
49 GetCOM()->FireNativeEvent(EVENT_OBJECT_HIDE); 46 GetCOM()->FireNativeEvent(EVENT_OBJECT_HIDE);
50 } 47 }
51 48
52 bool BrowserAccessibilityWin::IsNative() const { 49 bool BrowserAccessibilityWin::IsNative() const {
(...skipping 20 matching lines...) Expand all
73 return static_cast<BrowserAccessibilityWin*>(obj); 70 return static_cast<BrowserAccessibilityWin*>(obj);
74 } 71 }
75 72
76 const BrowserAccessibilityWin* 73 const BrowserAccessibilityWin*
77 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) { 74 ToBrowserAccessibilityWin(const BrowserAccessibility* obj) {
78 DCHECK(!obj || obj->IsNative()); 75 DCHECK(!obj || obj->IsNative());
79 return static_cast<const BrowserAccessibilityWin*>(obj); 76 return static_cast<const BrowserAccessibilityWin*>(obj);
80 } 77 }
81 78
82 } // namespace content 79 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility_com_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698