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

Side by Side Diff: content/components/navigation_interception/intercept_navigation_resource_throttle.cc

Issue 11417061: [android_webview] Enable navigation interception for iframes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make findbugs happy? Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/android/findbugs_filter/findbugs_known_bugs.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/components/navigation_interception/intercept_navigation_resour ce_throttle.h" 5 #include "content/components/navigation_interception/intercept_navigation_resour ce_throttle.h"
6 6
7 #include "content/public/browser/browser_thread.h" 7 #include "content/public/browser/browser_thread.h"
8 #include "content/public/browser/child_process_security_policy.h" 8 #include "content/public/browser/child_process_security_policy.h"
9 #include "content/public/browser/render_view_host.h" 9 #include "content/public/browser/render_view_host.h"
10 #include "content/public/browser/render_process_host.h" 10 #include "content/public/browser/render_process_host.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 bool InterceptNavigationResourceThrottle::CheckIfShouldIgnoreNavigation( 87 bool InterceptNavigationResourceThrottle::CheckIfShouldIgnoreNavigation(
88 const GURL& url) { 88 const GURL& url) {
89 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request_); 89 const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request_);
90 if (!info) 90 if (!info)
91 return false; 91 return false;
92 92
93 int render_process_id, render_view_id; 93 int render_process_id, render_view_id;
94 if (!info->GetAssociatedRenderView(&render_process_id, &render_view_id)) 94 if (!info->GetAssociatedRenderView(&render_process_id, &render_view_id))
95 return false; 95 return false;
96 96
97 // This class should only be instantiated for top level frame requests.
98 DCHECK(info->IsMainFrame());
99
100 ShouldIgnoreCallbackParams params; 97 ShouldIgnoreCallbackParams params;
101 params.render_process_id = render_process_id; 98 params.render_process_id = render_process_id;
102 params.render_view_id = render_view_id; 99 params.render_view_id = render_view_id;
103 params.url = url; 100 params.url = url;
104 params.referrer = Referrer(GURL(request_->referrer()), 101 params.referrer = Referrer(GURL(request_->referrer()),
105 info->GetReferrerPolicy()); 102 info->GetReferrerPolicy());
106 params.has_user_gesture = info->HasUserGesture(); 103 params.has_user_gesture = info->HasUserGesture();
107 params.is_post = request_->method() == "POST"; 104 params.is_post = request_->method() == "POST";
108 105
109 BrowserThread::PostTask( 106 BrowserThread::PostTask(
(...skipping 17 matching lines...) Expand all
127 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 124 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
128 125
129 if (should_ignore_navigation) { 126 if (should_ignore_navigation) {
130 controller()->CancelAndIgnore(); 127 controller()->CancelAndIgnore();
131 } else { 128 } else {
132 controller()->Resume(); 129 controller()->Resume();
133 } 130 }
134 } 131 }
135 132
136 } // namespace content 133 } // namespace content
OLDNEW
« no previous file with comments | « build/android/findbugs_filter/findbugs_known_bugs.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698