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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_base.h

Issue 538883002: Speculative fix for DelegatedFrameHost destructor crashes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Absolutely minimal fix Created 6 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
7 7
8 #if defined(OS_MACOSX) 8 #if defined(OS_MACOSX)
9 #include <OpenGL/OpenGL.h> 9 #include <OpenGL/OpenGL.h>
10 #endif 10 #endif
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // the renderer. 97 // the renderer.
98 void DidReceiveRendererFrame(); 98 void DidReceiveRendererFrame();
99 99
100 // Notification that a resize or move session ended on the native widget. 100 // Notification that a resize or move session ended on the native widget.
101 void UpdateScreenInfo(gfx::NativeView view); 101 void UpdateScreenInfo(gfx::NativeView view);
102 102
103 // Tells if the display property (work area/scale factor) has 103 // Tells if the display property (work area/scale factor) has
104 // changed since the last time. 104 // changed since the last time.
105 bool HasDisplayPropertyChanged(gfx::NativeView view); 105 bool HasDisplayPropertyChanged(gfx::NativeView view);
106 106
107 base::WeakPtr<RenderWidgetHostViewBase> GetWeakPtr();
108
107 //---------------------------------------------------------------------------- 109 //----------------------------------------------------------------------------
108 // The following methods can be overridden by derived classes. 110 // The following methods can be overridden by derived classes.
109 111
110 // Notifies the View that the renderer text selection has changed. 112 // Notifies the View that the renderer text selection has changed.
111 virtual void SelectionChanged(const base::string16& text, 113 virtual void SelectionChanged(const base::string16& text,
112 size_t offset, 114 size_t offset,
113 const gfx::Range& range); 115 const gfx::Range& range);
114 116
115 // The requested size of the renderer. May differ from GetViewBounds().size() 117 // The requested size of the renderer. May differ from GetViewBounds().size()
116 // when the view requires additional throttling. 118 // when the view requires additional throttling.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 virtual void TextInputStateChanged( 220 virtual void TextInputStateChanged(
219 const ViewHostMsg_TextInputState_Params& params) = 0; 221 const ViewHostMsg_TextInputState_Params& params) = 0;
220 222
221 // Cancel the ongoing composition of the input method attached to the view. 223 // Cancel the ongoing composition of the input method attached to the view.
222 virtual void ImeCancelComposition() = 0; 224 virtual void ImeCancelComposition() = 0;
223 225
224 // Notifies the View that the renderer has ceased to exist. 226 // Notifies the View that the renderer has ceased to exist.
225 virtual void RenderProcessGone(base::TerminationStatus status, 227 virtual void RenderProcessGone(base::TerminationStatus status,
226 int error_code) = 0; 228 int error_code) = 0;
227 229
230 // Notifies the View that the renderer's host has ceased to exist.
231 // The default implementation of this is a no-op. This hack exists to fix
232 // a crash on the branch.
233 // TODO(ccameron): Clean this up.
234 // http://crbug.com/404828
235 virtual void RenderWidgetHostGone() {}
236
228 // Tells the View to destroy itself. 237 // Tells the View to destroy itself.
229 virtual void Destroy() = 0; 238 virtual void Destroy() = 0;
230 239
231 // Tells the View that the tooltip text for the current mouse position over 240 // Tells the View that the tooltip text for the current mouse position over
232 // the page has changed. 241 // the page has changed.
233 virtual void SetTooltipText(const base::string16& tooltip_text) = 0; 242 virtual void SetTooltipText(const base::string16& tooltip_text) = 0;
234 243
235 // Notifies the View that the renderer selection bounds has changed. 244 // Notifies the View that the renderer selection bounds has changed.
236 // |start_rect| and |end_rect| are the bounds end of the selection in the 245 // |start_rect| and |end_rect| are the bounds end of the selection in the
237 // coordinate system of the render view. |start_direction| and |end_direction| 246 // coordinate system of the render view. |start_direction| and |end_direction|
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 426
418 private: 427 private:
419 void FlushInput(); 428 void FlushInput();
420 429
421 gfx::Rect current_display_area_; 430 gfx::Rect current_display_area_;
422 431
423 uint32 renderer_frame_number_; 432 uint32 renderer_frame_number_;
424 433
425 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_; 434 base::OneShotTimer<RenderWidgetHostViewBase> flush_input_timer_;
426 435
436 base::WeakPtrFactory<RenderWidgetHostViewBase> weak_factory_;
437
427 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase); 438 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewBase);
428 }; 439 };
429 440
430 } // namespace content 441 } // namespace content
431 442
432 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_ 443 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698