diff options
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_view.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/render_view.h | 2 | ||||
-rw-r--r-- | chrome/renderer/renderer_webkitclient_impl.cc | 6 | ||||
-rw-r--r-- | chrome/renderer/renderer_webkitclient_impl.h | 1 |
4 files changed, 7 insertions, 10 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 431deac..59e61bd 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -1690,14 +1690,6 @@ bool RenderView::RunBeforeUnloadConfirm(WebFrame* webframe, return success; } -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) { diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index 3153ad2..278fc7b 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -150,8 +150,6 @@ class RenderView : public RenderWidget, std::wstring* result); virtual bool RunBeforeUnloadConfirm(WebFrame* webframe, const std::wstring& message); - virtual void EnableSuddenTermination(); - virtual void DisableSuddenTermination(); virtual void QueryFormFieldAutofill(const std::wstring& field_name, const std::wstring& text, int64 node_id); diff --git a/chrome/renderer/renderer_webkitclient_impl.cc b/chrome/renderer/renderer_webkitclient_impl.cc index 3a02adb..78f3c22 100644 --- a/chrome/renderer/renderer_webkitclient_impl.cc +++ b/chrome/renderer/renderer_webkitclient_impl.cc @@ -77,6 +77,12 @@ WebString RendererWebKitClientImpl::defaultLocale() { return WideToUTF16(webkit_glue::GetWebKitLocale()); } +void RendererWebKitClientImpl::suddenTerminationChanged(bool enabled) { + RenderThread* thread = RenderThread::current(); + if (thread) // NULL in unittests. + thread->Send(new ViewHostMsg_SuddenTerminationChanged(enabled)); +} + //------------------------------------------------------------------------------ WebString RendererWebKitClientImpl::MimeRegistry::mimeTypeForExtension( diff --git a/chrome/renderer/renderer_webkitclient_impl.h b/chrome/renderer/renderer_webkitclient_impl.h index 3c4cb48..ef93dee 100644 --- a/chrome/renderer/renderer_webkitclient_impl.h +++ b/chrome/renderer/renderer_webkitclient_impl.h @@ -29,6 +29,7 @@ class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl { const WebKit::WebURL& url, const WebKit::WebURL& policy_url); virtual void prefetchHostName(const WebKit::WebString&); virtual WebKit::WebString defaultLocale(); + virtual void suddenTerminationChanged(bool enabled); private: class MimeRegistry : public webkit_glue::SimpleWebMimeRegistryImpl { |