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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.h

Issue 2543803002: Fix crash where a RenderWidgetHost can be deleted in the middle of a (Closed)
Patch Set: addressing comments Created 4 years 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/web_contents/web_contents_view_aura.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) 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_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 init_rwhv_with_null_parent_for_testing_ = set; 59 init_rwhv_with_null_parent_for_testing_ = set;
60 } 60 }
61 61
62 private: 62 private:
63 class WindowObserver; 63 class WindowObserver;
64 64
65 ~WebContentsViewAura() override; 65 ~WebContentsViewAura() override;
66 66
67 void SizeChangedCommon(const gfx::Size& size); 67 void SizeChangedCommon(const gfx::Size& size);
68 68
69 void EndDrag(blink::WebDragOperationsMask ops); 69 void EndDrag(RenderWidgetHost* source_rwh, blink::WebDragOperationsMask ops);
70 70
71 void InstallOverscrollControllerDelegate(RenderWidgetHostViewAura* view); 71 void InstallOverscrollControllerDelegate(RenderWidgetHostViewAura* view);
72 72
73 // Sets up the content window in preparation for starting an overscroll 73 // Sets up the content window in preparation for starting an overscroll
74 // gesture. 74 // gesture.
75 void PrepareContentWindowForOverscroll(); 75 void PrepareContentWindowForOverscroll();
76 76
77 // Completes the navigation in response to a completed overscroll gesture. 77 // Completes the navigation in response to a completed overscroll gesture.
78 // The navigation happens after an animation (either the overlay window 78 // The navigation happens after an animation (either the overlay window
79 // animates in, or the content window animates out). 79 // animates in, or the content window animates out).
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 // We keep track of the RenderWidgetHost we're dragging over. If it changes 197 // We keep track of the RenderWidgetHost we're dragging over. If it changes
198 // during a drag, we need to re-send the DragEnter message. 198 // during a drag, we need to re-send the DragEnter message.
199 base::WeakPtr<RenderWidgetHostImpl> current_rwh_for_drag_; 199 base::WeakPtr<RenderWidgetHostImpl> current_rwh_for_drag_;
200 200
201 // We also keep track of the RenderViewHost we're dragging over to avoid 201 // We also keep track of the RenderViewHost we're dragging over to avoid
202 // sending the drag exited message after leaving the current 202 // sending the drag exited message after leaving the current
203 // view. |current_rvh_for_drag_| should not be dereferenced. 203 // view. |current_rvh_for_drag_| should not be dereferenced.
204 void* current_rvh_for_drag_; 204 void* current_rvh_for_drag_;
205 205
206 // We keep track of the RenderWidgetHost from which the current drag started,
207 // in order to properly route the drag end message to it.
208 base::WeakPtr<RenderWidgetHostImpl> drag_start_rwh_;
209
210 // The overscroll gesture currently in progress. 206 // The overscroll gesture currently in progress.
211 OverscrollMode current_overscroll_gesture_; 207 OverscrollMode current_overscroll_gesture_;
212 208
213 // This is the completed overscroll gesture. This is used for the animation 209 // This is the completed overscroll gesture. This is used for the animation
214 // callback that happens in response to a completed overscroll gesture. 210 // callback that happens in response to a completed overscroll gesture.
215 OverscrollMode completed_overscroll_gesture_; 211 OverscrollMode completed_overscroll_gesture_;
216 212
217 // This manages the overlay window that shows the screenshot during a history 213 // This manages the overlay window that shows the screenshot during a history
218 // navigation triggered by the overscroll gesture. 214 // navigation triggered by the overscroll gesture.
219 std::unique_ptr<OverscrollNavigationOverlay> navigation_overlay_; 215 std::unique_ptr<OverscrollNavigationOverlay> navigation_overlay_;
220 216
221 std::unique_ptr<GestureNavSimple> gesture_nav_simple_; 217 std::unique_ptr<GestureNavSimple> gesture_nav_simple_;
222 218
223 bool init_rwhv_with_null_parent_for_testing_; 219 bool init_rwhv_with_null_parent_for_testing_;
224 220
225 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura); 221 DISALLOW_COPY_AND_ASSIGN(WebContentsViewAura);
226 }; 222 };
227 223
228 } // namespace content 224 } // namespace content
229 225
230 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_ 226 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_VIEW_AURA_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698