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

Side by Side Diff: content/renderer/accessibility/render_accessibility_impl.h

Issue 2341503002: Fix race condition causing DCHECK(ack_pending_) to trip. (Closed)
Patch Set: Created 4 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
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 #ifndef CONTENT_RENDERER_ACCESSIBILITY_RENDER_ACCESSIBILITY_IMPL_H_ 5 #ifndef CONTENT_RENDERER_ACCESSIBILITY_RENDER_ACCESSIBILITY_IMPL_H_
6 #define CONTENT_RENDERER_ACCESSIBILITY_RENDER_ACCESSIBILITY_IMPL_H_ 6 #define CONTENT_RENDERER_ACCESSIBILITY_RENDER_ACCESSIBILITY_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 // The RenderFrameImpl that owns us. 109 // The RenderFrameImpl that owns us.
110 RenderFrameImpl* render_frame_; 110 RenderFrameImpl* render_frame_;
111 111
112 private: 112 private:
113 // RenderFrameObserver implementation. 113 // RenderFrameObserver implementation.
114 void OnDestruct() override; 114 void OnDestruct() override;
115 115
116 // Handlers for messages from the browser to the renderer. 116 // Handlers for messages from the browser to the renderer.
117 void OnDoDefaultAction(int acc_obj_id); 117 void OnDoDefaultAction(int acc_obj_id);
118 void OnEventsAck(); 118 void OnEventsAck(int ack_token);
119 void OnFatalError(); 119 void OnFatalError();
120 void OnHitTest(gfx::Point point); 120 void OnHitTest(gfx::Point point);
121 void OnSetAccessibilityFocus(int acc_obj_id); 121 void OnSetAccessibilityFocus(int acc_obj_id);
122 void OnReset(int reset_token); 122 void OnReset(int reset_token);
123 void OnScrollToMakeVisible(int acc_obj_id, gfx::Rect subfocus); 123 void OnScrollToMakeVisible(int acc_obj_id, gfx::Rect subfocus);
124 void OnScrollToPoint(int acc_obj_id, gfx::Point point); 124 void OnScrollToPoint(int acc_obj_id, gfx::Point point);
125 void OnSetScrollOffset(int acc_obj_id, gfx::Point offset); 125 void OnSetScrollOffset(int acc_obj_id, gfx::Point offset);
126 void OnSetFocus(int acc_obj_id); 126 void OnSetFocus(int acc_obj_id);
127 void OnSetSelection(int anchor_acc_obj_id, 127 void OnSetSelection(int anchor_acc_obj_id,
128 int anchor_offset, 128 int anchor_offset,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // is fixed. 161 // is fixed.
162 gfx::Size last_scroll_offset_; 162 gfx::Size last_scroll_offset_;
163 163
164 // Set if we are waiting for an accessibility event ack. 164 // Set if we are waiting for an accessibility event ack.
165 bool ack_pending_; 165 bool ack_pending_;
166 166
167 // Nonzero if the browser requested we reset the accessibility state. 167 // Nonzero if the browser requested we reset the accessibility state.
168 // We need to return this token in the next IPC. 168 // We need to return this token in the next IPC.
169 int reset_token_; 169 int reset_token_;
170 170
171 int ack_token_;
172
171 // So we can queue up tasks to be executed later. 173 // So we can queue up tasks to be executed later.
172 base::WeakPtrFactory<RenderAccessibilityImpl> weak_factory_; 174 base::WeakPtrFactory<RenderAccessibilityImpl> weak_factory_;
173 175
174 DISALLOW_COPY_AND_ASSIGN(RenderAccessibilityImpl); 176 DISALLOW_COPY_AND_ASSIGN(RenderAccessibilityImpl);
175 }; 177 };
176 178
177 } // namespace content 179 } // namespace content
178 180
179 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ 181 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698