Index: chrome/renderer/chrome_render_process_observer.cc |
diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc |
index f6455ff9ebdec8a69e3469bdc31f7e0970191721..384e0117f75141447d70d63ca56fd3e8bf259779 100644 |
--- a/chrome/renderer/chrome_render_process_observer.cc |
+++ b/chrome/renderer/chrome_render_process_observer.cc |
@@ -34,14 +34,14 @@ |
#include "components/variations/variations_util.h" |
#include "content/public/child/resource_dispatcher_delegate.h" |
#include "content/public/common/service_registry.h" |
+#include "content/public/renderer/render_frame.h" |
#include "content/public/renderer/render_thread.h" |
-#include "content/public/renderer/render_view.h" |
-#include "content/public/renderer/render_view_visitor.h" |
#include "net/base/net_errors.h" |
#include "net/base/net_module.h" |
#include "third_party/WebKit/public/web/WebCache.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" |
#include "third_party/WebKit/public/web/WebRuntimeFeatures.h" |
#include "third_party/WebKit/public/web/WebSecurityPolicy.h" |
#include "third_party/WebKit/public/web/WebView.h" |
@@ -88,6 +88,16 @@ class RendererResourceDelegate : public content::ResourceDispatcherDelegate { |
if (error_code == net::ERR_ABORTED) { |
return NULL; |
} |
+ if (resource_type == content::RESOURCE_TYPE_MAIN_FRAME) { |
+ blink::WebFrame* web_frame = |
+ blink::WebLocalFrame::frameForCurrentContext(); |
+ content::RenderFrame* render_frame = nullptr; |
+ if (web_frame != nullptr) |
+ render_frame = content::RenderFrame::FromWebFrame(web_frame); |
+ DLOG(WARNING) << "Got frames " << (web_frame != nullptr) << " & " |
+ << (render_frame != nullptr); |
+ // Investigate |
+ } |
// Resource canceled with a specific error are filtered. |
return SecurityFilterPeer::CreateSecurityFilterPeerForDeniedRequest( |