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

Unified Diff: chrome/renderer/chrome_render_view_observer.cc

Issue 807583006: Fix ChromeRenderViewObserver::DidStopLoading to be OOPIF compatible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_render_view_observer.cc
diff --git a/chrome/renderer/chrome_render_view_observer.cc b/chrome/renderer/chrome_render_view_observer.cc
index a2e1b9aecc961cc413ebc94187a186cdd02103b8..aa949bb1a3e3a38688dd3d8a4931ee7c1414f1e2 100644
--- a/chrome/renderer/chrome_render_view_observer.cc
+++ b/chrome/renderer/chrome_render_view_observer.cc
@@ -334,16 +334,21 @@ void ChromeRenderViewObserver::DidStartLoading() {
void ChromeRenderViewObserver::DidStopLoading() {
WebFrame* main_frame = render_view()->GetWebView()->mainFrame();
- GURL osdd_url = main_frame->document().openSearchDescriptionURL();
- if (!osdd_url.is_empty()) {
- Send(new ChromeViewHostMsg_PageHasOSDD(
- routing_id(), main_frame->document().url(), osdd_url,
- search_provider::AUTODETECTED_PROVIDER));
- }
- // Don't capture pages including refresh meta tag.
- if (HasRefreshMetaTag(main_frame))
- return;
+ // Only WebLocalFrames host the document associated with a frame and need to
+ // process meta or OSDD tags.
+ if (main_frame->isWebLocalFrame()) {
+ GURL osdd_url = main_frame->document().openSearchDescriptionURL();
+ if (!osdd_url.is_empty()) {
+ Send(new ChromeViewHostMsg_PageHasOSDD(
+ routing_id(), main_frame->document().url(), osdd_url,
+ search_provider::AUTODETECTED_PROVIDER));
+ }
+
+ // Don't capture pages including refresh meta tag.
+ if (HasRefreshMetaTag(main_frame))
+ return;
+ }
CapturePageInfoLater(
Lei Zhang 2014/12/16 23:46:57 I think you want this to be for WebLocalFrame only
nasko 2014/12/16 23:48:59 I'm not certain and the CapturePageInfo already ha
Lei Zhang 2014/12/17 00:14:20 It looks like creis@ has plans to move the Capture
false, // preliminary_capture
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698