Chromium Code Reviews| Index: extensions/renderer/script_injection_manager.cc |
| diff --git a/extensions/renderer/script_injection_manager.cc b/extensions/renderer/script_injection_manager.cc |
| index 19c356f4c2b57eaca8d77d04c09092848b3bf335..9dbe61a86234936957a93de6fed8dffd2f67d407 100644 |
| --- a/extensions/renderer/script_injection_manager.cc |
| +++ b/extensions/renderer/script_injection_manager.cc |
| @@ -26,6 +26,7 @@ |
| #include "extensions/renderer/scripts_run_info.h" |
| #include "extensions/renderer/web_ui_injection_host.h" |
| #include "ipc/ipc_message_macros.h" |
| +#include "third_party/WebKit/public/platform/WebURLError.h" |
| #include "third_party/WebKit/public/web/WebDocument.h" |
| #include "third_party/WebKit/public/web/WebFrame.h" |
| #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| @@ -84,6 +85,7 @@ class ScriptInjectionManager::RFOHelper : public content::RenderFrameObserver { |
| int script_id, |
| const GURL& url); |
| virtual void OnPermitScriptInjection(int64_t request_id); |
| + void OnSet204Or205Error(); |
| // Tells the ScriptInjectionManager to run tasks associated with |
| // document_idle. |
| @@ -123,6 +125,7 @@ bool ScriptInjectionManager::RFOHelper::OnMessageReceived( |
| OnPermitScriptInjection) |
| IPC_MESSAGE_HANDLER(ExtensionMsg_ExecuteDeclarativeScript, |
| OnExecuteDeclarativeScript) |
| + IPC_MESSAGE_HANDLER(ExtensionMsg_Set204Or205Error, OnSet204Or205Error) |
| IPC_MESSAGE_UNHANDLED(handled = false) |
| IPC_END_MESSAGE_MAP() |
| return handled; |
| @@ -232,6 +235,10 @@ void ScriptInjectionManager::RFOHelper::OnPermitScriptInjection( |
| manager_->HandlePermitScriptInjection(request_id); |
| } |
| +void ScriptInjectionManager::RFOHelper::OnSet204Or205Error() { |
| + DidFailProvisionalLoad(blink::WebURLError()); |
|
Devlin
2016/10/31 17:24:00
In a non-plznavigate world, would a 204/205 cause
Devlin
2016/10/31 17:28:14
For more context, I'm asking because of the case o
|
| +} |
| + |
| void ScriptInjectionManager::RFOHelper::RunIdle() { |
| // Only notify the manager if the frame hasn't either been removed or already |
| // had idle run since the task to RunIdle() was posted. |