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

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: 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 // Enum used in histograms to differentiate between the different
nasko 2016/07/12 17:18:02 nit: Enum is redundant, as it is obvious from the
clamy 2016/07/13 10:02:21 Done.
137 // types of renderer hang reported by
138 // RenderWidgetHostDelegate::RendererUnresponsive.
139 // Only add values at the end, do not delete values.
nasko 2016/07/12 17:18:02 Does that mean we will keep this enum/UMA forever?
Alexei Svitkine (slow) 2016/07/12 18:36:40 You can always delete histograms. That's fine. Th
clamy 2016/07/13 10:02:21 I'm not sure how DumpWithoutCrashing works, and it
nasko 2016/07/15 17:32:08 DumpWithoutCrashing literally does what it says -
140 enum RendererUnresponsiveType {
141 RENDERER_UNRESPONSIVE_UNKNOWN = 0,
142 RENDERER_UNRESPONSIVE_IN_FLIGHT_EVENTS = 1,
143 RENDERER_UNRESPONSIVE_DIALOG_CLOSED = 2,
144 RENDERER_UNRESPONSIVE_DIALOG_SUPPRESSED = 3,
145 RENDERER_UNRESPONSIVE_BEFORE_UNLOAD = 4,
146 RENDERER_UNRESPONSIVE_UNLOAD = 5,
147 RENDERER_UNRESPONSIVE_CLOSE_PAGE = 6,
148 RENDERER_UNRESPONSIVE_MAX = RENDERER_UNRESPONSIVE_CLOSE_PAGE,
149 };
150
136 // Notification that the renderer has become unresponsive. The 151 // Notification that the renderer has become unresponsive. The
137 // delegate can use this notification to show a warning to the user. 152 // delegate can use this notification to show a warning to the user.
138 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host) {} 153 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host,
154 RendererUnresponsiveType type) {}
139 155
140 // Notification that a previously unresponsive renderer has become 156 // Notification that a previously unresponsive renderer has become
141 // responsive again. The delegate can use this notification to end the 157 // responsive again. The delegate can use this notification to end the
142 // warning shown to the user. 158 // warning shown to the user.
143 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {} 159 virtual void RendererResponsive(RenderWidgetHostImpl* render_widget_host) {}
144 160
145 // Requests to lock the mouse. Once the request is approved or rejected, 161 // Requests to lock the mouse. Once the request is approved or rejected,
146 // GotResponseToLockMouseRequest() will be called on the requesting render 162 // GotResponseToLockMouseRequest() will be called on the requesting render
147 // widget host. 163 // widget host.
148 virtual void RequestToLockMouse(RenderWidgetHostImpl* render_widget_host, 164 virtual void RequestToLockMouse(RenderWidgetHostImpl* render_widget_host,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // Returns the TextInputManager tracking text input state. 205 // Returns the TextInputManager tracking text input state.
190 virtual TextInputManager* GetTextInputManager(); 206 virtual TextInputManager* GetTextInputManager();
191 207
192 protected: 208 protected:
193 virtual ~RenderWidgetHostDelegate() {} 209 virtual ~RenderWidgetHostDelegate() {}
194 }; 210 };
195 211
196 } // namespace content 212 } // namespace content
197 213
198 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ 214 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698