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

Side by Side Diff: content/browser/accessibility/browser_accessibility_com_win.h

Issue 2873683003: Use BrowserAccessibilityComWin::Destroy to clear delegate and owner. (Closed)
Patch Set: 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 | « no previous file | content/browser/accessibility/browser_accessibility_win.cc » ('j') | 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) 2017 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2017 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 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COM_WIN_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COM_WIN_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COM_WIN_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COM_WIN_H_
7 7
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlcom.h> 9 #include <atlcom.h>
10 #include <oleacc.h> 10 #include <oleacc.h>
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 } 738 }
739 std::vector<int32_t>& hyperlinks() const { 739 std::vector<int32_t>& hyperlinks() const {
740 return win_attributes_->hyperlinks; 740 return win_attributes_->hyperlinks;
741 } 741 }
742 742
743 private: 743 private:
744 // Setter and getter for the browser accessibility owner 744 // Setter and getter for the browser accessibility owner
745 BrowserAccessibilityWin* GetOwner() const { return owner_; } 745 BrowserAccessibilityWin* GetOwner() const { return owner_; }
746 void SetOwner(BrowserAccessibilityWin* owner) { owner_ = owner; } 746 void SetOwner(BrowserAccessibilityWin* owner) { owner_ = owner; }
747 747
748 // Called when BrowserAccessibilityWin is about to go away.
749 // At this point, we detach from it.
750 void detach() {
dmazzoni 2017/05/10 06:15:50 I think this is the same as AXPlatformNode::Destro
751 owner_ = nullptr;
752 delegate_ = nullptr;
753 }
754
748 BrowserAccessibilityManager* owners_manager() const; 755 BrowserAccessibilityManager* owners_manager() const;
749 756
750 // Returns the IA2 text attributes for this object. 757 // Returns the IA2 text attributes for this object.
751 std::vector<base::string16> ComputeTextAttributes() const; 758 std::vector<base::string16> ComputeTextAttributes() const;
752 759
753 // Add one to the reference count and return the same object. Always 760 // Add one to the reference count and return the same object. Always
754 // use this method when returning a BrowserAccessibilityComWin object as 761 // use this method when returning a BrowserAccessibilityComWin object as
755 // an output parameter to a COM interface, never use it otherwise. 762 // an output parameter to a COM interface, never use it otherwise.
756 BrowserAccessibilityComWin* NewReference(); 763 BrowserAccessibilityComWin* NewReference();
757 764
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 980
974 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityComWin); 981 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityComWin);
975 }; 982 };
976 983
977 CONTENT_EXPORT BrowserAccessibilityComWin* ToBrowserAccessibilityComWin( 984 CONTENT_EXPORT BrowserAccessibilityComWin* ToBrowserAccessibilityComWin(
978 BrowserAccessibility* obj); 985 BrowserAccessibility* obj);
979 986
980 } // namespace content 987 } // namespace content
981 988
982 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COM_WIN_H_ 989 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COM_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/accessibility/browser_accessibility_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698