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

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

Issue 2384813002: Don't wait to close tabs waiting for JavaScript dialogs. (Closed)
Patch Set: now a bit on webcontents, no timer fiddling Created 4 years, 2 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // renderer hang reported by RenderWidgetHostDelegate::RendererUnresponsive. 144 // renderer hang reported by RenderWidgetHostDelegate::RendererUnresponsive.
145 // Only add values at the end, do not delete values. 145 // Only add values at the end, do not delete values.
146 enum RendererUnresponsiveType { 146 enum RendererUnresponsiveType {
147 RENDERER_UNRESPONSIVE_UNKNOWN = 0, 147 RENDERER_UNRESPONSIVE_UNKNOWN = 0,
148 RENDERER_UNRESPONSIVE_IN_FLIGHT_EVENTS = 1, 148 RENDERER_UNRESPONSIVE_IN_FLIGHT_EVENTS = 1,
149 RENDERER_UNRESPONSIVE_DIALOG_CLOSED = 2, 149 RENDERER_UNRESPONSIVE_DIALOG_CLOSED = 2,
150 RENDERER_UNRESPONSIVE_DIALOG_SUPPRESSED = 3, 150 RENDERER_UNRESPONSIVE_DIALOG_SUPPRESSED = 3,
151 RENDERER_UNRESPONSIVE_BEFORE_UNLOAD = 4, 151 RENDERER_UNRESPONSIVE_BEFORE_UNLOAD = 4,
152 RENDERER_UNRESPONSIVE_UNLOAD = 5, 152 RENDERER_UNRESPONSIVE_UNLOAD = 5,
153 RENDERER_UNRESPONSIVE_CLOSE_PAGE = 6, 153 RENDERER_UNRESPONSIVE_CLOSE_PAGE = 6,
154 RENDERER_UNRESPONSIVE_MAX = RENDERER_UNRESPONSIVE_CLOSE_PAGE, 154 RENDERER_UNRESPONSIVE_DIALOG_SHOWING = 7,
155 RENDERER_UNRESPONSIVE_MAX = RENDERER_UNRESPONSIVE_DIALOG_SHOWING,
155 }; 156 };
156 157
157 // Notification that the renderer has become unresponsive. The 158 // Notification that the renderer has become unresponsive. The
158 // delegate can use this notification to show a warning to the user. 159 // delegate can use this notification to show a warning to the user.
159 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host, 160 virtual void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host,
160 RendererUnresponsiveType type) {} 161 RendererUnresponsiveType type) {}
161 162
162 // Notification that a previously unresponsive renderer has become 163 // Notification that a previously unresponsive renderer has become
163 // responsive again. The delegate can use this notification to end the 164 // responsive again. The delegate can use this notification to end the
164 // warning shown to the user. 165 // warning shown to the user.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // this RenderWidgetHost. 223 // this RenderWidgetHost.
223 virtual bool IsHidden(); 224 virtual bool IsHidden();
224 225
225 protected: 226 protected:
226 virtual ~RenderWidgetHostDelegate() {} 227 virtual ~RenderWidgetHostDelegate() {}
227 }; 228 };
228 229
229 } // namespace content 230 } // namespace content
230 231
231 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ 232 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698