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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2380193003: Block navigations in extensions via ShouldTransferNavigation (not via OpenURL). (Closed)
Patch Set: Created 4 years, 2 months 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
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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 3301 matching lines...) Expand 10 before | Expand all | Expand 10 after
3312 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3312 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3313 DidOpenRequestedURL(new_contents, 3313 DidOpenRequestedURL(new_contents,
3314 render_frame_host, 3314 render_frame_host,
3315 params.url, 3315 params.url,
3316 params.referrer, 3316 params.referrer,
3317 params.disposition, 3317 params.disposition,
3318 params.transition)); 3318 params.transition));
3319 } 3319 }
3320 } 3320 }
3321 3321
3322 bool WebContentsImpl::ShouldTransferNavigation() { 3322 bool WebContentsImpl::ShouldTransferNavigation(bool is_main_frame_navigation) {
3323 if (!delegate_) 3323 if (!delegate_)
3324 return true; 3324 return true;
3325 return delegate_->ShouldTransferNavigation(); 3325 return delegate_->ShouldTransferNavigation(is_main_frame_navigation);
3326 } 3326 }
3327 3327
3328 bool WebContentsImpl::ShouldPreserveAbortedURLs() { 3328 bool WebContentsImpl::ShouldPreserveAbortedURLs() {
3329 if (!delegate_) 3329 if (!delegate_)
3330 return false; 3330 return false;
3331 return delegate_->ShouldPreserveAbortedURLs(this); 3331 return delegate_->ShouldPreserveAbortedURLs(this);
3332 } 3332 }
3333 3333
3334 void WebContentsImpl::DidCommitProvisionalLoad( 3334 void WebContentsImpl::DidCommitProvisionalLoad(
3335 RenderFrameHostImpl* render_frame_host, 3335 RenderFrameHostImpl* render_frame_host,
(...skipping 1878 matching lines...) Expand 10 before | Expand all | Expand 10 after
5214 for (RenderViewHost* render_view_host : render_view_host_set) 5214 for (RenderViewHost* render_view_host : render_view_host_set)
5215 render_view_host->OnWebkitPreferencesChanged(); 5215 render_view_host->OnWebkitPreferencesChanged();
5216 } 5216 }
5217 5217
5218 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 5218 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
5219 JavaScriptDialogManager* dialog_manager) { 5219 JavaScriptDialogManager* dialog_manager) {
5220 dialog_manager_ = dialog_manager; 5220 dialog_manager_ = dialog_manager;
5221 } 5221 }
5222 5222
5223 } // namespace content 5223 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/public/browser/web_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698