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

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: Update test 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Whether we are processing a client-initiated action. 171 // Whether we are processing a client-initiated action.
172 bool during_action_; 172 bool during_action_;
173 173
174 // Token to send with event messages so we know when they're acknowledged.
175 int ack_token_;
176
174 // So we can queue up tasks to be executed later. 177 // So we can queue up tasks to be executed later.
175 base::WeakPtrFactory<RenderAccessibilityImpl> weak_factory_; 178 base::WeakPtrFactory<RenderAccessibilityImpl> weak_factory_;
176 179
177 DISALLOW_COPY_AND_ASSIGN(RenderAccessibilityImpl); 180 DISALLOW_COPY_AND_ASSIGN(RenderAccessibilityImpl);
178 }; 181 };
179 182
180 } // namespace content 183 } // namespace content
181 184
182 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ 185 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_
OLDNEW
« no previous file with comments | « content/common/accessibility_messages.h ('k') | content/renderer/accessibility/render_accessibility_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698