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

Unified Diff: chrome/renderer/render_view.cc

Issue 9746: Change old code from "unloadListnerChanged" model to new WebKit EnableSuddenT... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/render_view.h ('k') | third_party/WebKit/WebCore/dom/Document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 5111)
+++ chrome/renderer/render_view.cc (working copy)
@@ -1647,26 +1647,14 @@
return success;
}
-void RenderView::OnUnloadListenerChanged(WebView* webview, WebFrame* webframe) {
- bool has_listener = false;
- if (!has_unload_listener_) {
- has_listener = webframe->HasUnloadListener();
- } else {
- WebFrame* frame = webview->GetMainFrame();
- while (frame != NULL) {
- if (frame->HasUnloadListener()) {
- has_listener = true;
- break;
- }
- frame = webview->GetNextFrameAfter(frame, false);
- }
- }
- if (has_listener != has_unload_listener_) {
- has_unload_listener_ = has_listener;
- Send(new ViewHostMsg_UnloadListenerChanged(routing_id_, has_listener));
- }
+void RenderView::EnableSuddenTermination() {
+ Send(new ViewHostMsg_UnloadListenerChanged(routing_id_, false));
}
+void RenderView::DisableSuddenTermination() {
+ Send(new ViewHostMsg_UnloadListenerChanged(routing_id_, true));
+}
+
void RenderView::QueryFormFieldAutofill(const std::wstring& field_name,
const std::wstring& text,
int64 node_id) {
« no previous file with comments | « chrome/renderer/render_view.h ('k') | third_party/WebKit/WebCore/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698