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

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

Issue 2136173003: Add an histogram to differentiate between hang types of the renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed asan issue Created 4 years, 5 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_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // RenderWidgetHost to this function to determine who should ultimately 126 // RenderWidgetHost to this function to determine who should ultimately
127 // consume the event. This facilitates keyboard event routing with 127 // consume the event. This facilitates keyboard event routing with
128 // out-of-process iframes, where multiple RenderWidgetHosts may be involved 128 // out-of-process iframes, where multiple RenderWidgetHosts may be involved
129 // in rendering a page, yet keyboard events all arrive at the main frame's 129 // in rendering a page, yet keyboard events all arrive at the main frame's
130 // RenderWidgetHostView. When a main frame's RenderWidgetHost is passed in, 130 // RenderWidgetHostView. When a main frame's RenderWidgetHost is passed in,
131 // the function returns the focused frame that should consume keyboard 131 // the function returns the focused frame that should consume keyboard
132 // events. In all other cases, the function returns back |receiving_widget|. 132 // events. In all other cases, the function returns back |receiving_widget|.
133 virtual RenderWidgetHostImpl* GetFocusedRenderWidgetHost( 133 virtual RenderWidgetHostImpl* GetFocusedRenderWidgetHost(
134 RenderWidgetHostImpl* receiving_widget); 134 RenderWidgetHostImpl* receiving_widget);
135 135
136 // Used in histograms to differentiate between the different types of
137 // renderer hang reported by RenderWidgetHostDelegate::RendererUnresponsive.
138 // Only add values at the end, do not delete values.
139 enum RendererUnresponsiveType {
140 RENDERER_UNRESPONSIVE_UNKNOWN = 0,
141 RENDERER_UNRESPONSIVE_IN_FLIGHT_EVENTS = 1,
142 RENDERER_UNRESPONSIVE_DIALOG_CLOSED = 2,
143 RENDERER_UNRESPONSIVE_DIALOG_SUPPRESSED = 3,
144 RENDERER_UNRESPONSIVE_BEFORE_UNLOAD = 4,
145 RENDERER_UNRESPONSIVE_UNLOAD = 5,
146 RENDERER_UNRESPONSIVE_CLOSE_PAGE = 6,
147 RENDERER_UNRESPONSIVE_MAX = RENDERER_UNRESPONSIVE_CLOSE_PAGE,
148 };
149
136 // Notification that the renderer has become unresponsive. The 150 // Notification that the renderer has become unresponsive. The
137 // delegate can use this notification to show a warning to the user. 151 // delegate can use this notification to show a warning to the user.
138 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host) {} 152 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host,
153 RendererUnresponsiveType type) {}
139 154
140 // Notification that a previously unresponsive renderer has become 155 // Notification that a previously unresponsive renderer has become
141 // responsive again. The delegate can use this notification to end the 156 // responsive again. The delegate can use this notification to end the
142 // warning shown to the user. 157 // warning shown to the user.
143 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {} 158 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {}
144 159
145 // Requests to lock the mouse. Once the request is approved or rejected, 160 // Requests to lock the mouse. Once the request is approved or rejected,
146 // GotResponseToLockMouseRequest() will be called on the requesting render 161 // GotResponseToLockMouseRequest() will be called on the requesting render
147 // widget host. |privileged| means that the request is always granted, used 162 // widget host. |privileged| means that the request is always granted, used
148 // for Pepper Flash. 163 // for Pepper Flash.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 // Returns the TextInputManager tracking text input state. 209 // Returns the TextInputManager tracking text input state.
195 virtual TextInputManager* GetTextInputManager(); 210 virtual TextInputManager* GetTextInputManager();
196 211
197 protected: 212 protected:
198 virtual ~RenderWidgetHostDelegate() {} 213 virtual ~RenderWidgetHostDelegate() {}
199 }; 214 };
200 215
201 } // namespace content 216 } // namespace content
202 217
203 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ 218 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698