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

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

Issue 2377833002: Block navigations in extensions via ShouldTransferNavigation (not via OpenURL). (Closed)
Patch Set: Add missing files under chrome/test/data/extensions/api_test/browser_action/popup_with_form/ 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 3334 matching lines...) Expand 10 before | Expand all | Expand 10 after
3345 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3345 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3346 DidOpenRequestedURL(new_contents, 3346 DidOpenRequestedURL(new_contents,
3347 render_frame_host, 3347 render_frame_host,
3348 params.url, 3348 params.url,
3349 params.referrer, 3349 params.referrer,
3350 params.disposition, 3350 params.disposition,
3351 params.transition)); 3351 params.transition));
3352 } 3352 }
3353 } 3353 }
3354 3354
3355 bool WebContentsImpl::ShouldTransferNavigation() { 3355 bool WebContentsImpl::ShouldTransferNavigation(bool is_main_frame_navigation) {
3356 if (!delegate_) 3356 if (!delegate_)
3357 return true; 3357 return true;
3358 return delegate_->ShouldTransferNavigation(); 3358 return delegate_->ShouldTransferNavigation(is_main_frame_navigation);
3359 } 3359 }
3360 3360
3361 bool WebContentsImpl::ShouldPreserveAbortedURLs() { 3361 bool WebContentsImpl::ShouldPreserveAbortedURLs() {
3362 if (!delegate_) 3362 if (!delegate_)
3363 return false; 3363 return false;
3364 return delegate_->ShouldPreserveAbortedURLs(this); 3364 return delegate_->ShouldPreserveAbortedURLs(this);
3365 } 3365 }
3366 3366
3367 void WebContentsImpl::DidCommitProvisionalLoad( 3367 void WebContentsImpl::DidCommitProvisionalLoad(
3368 RenderFrameHostImpl* render_frame_host, 3368 RenderFrameHostImpl* render_frame_host,
(...skipping 1889 matching lines...) Expand 10 before | Expand all | Expand 10 after
5258 dialog_manager_ = dialog_manager; 5258 dialog_manager_ = dialog_manager;
5259 } 5259 }
5260 5260
5261 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5261 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5262 auto it = binding_sets_.find(interface_name); 5262 auto it = binding_sets_.find(interface_name);
5263 if (it != binding_sets_.end()) 5263 if (it != binding_sets_.end())
5264 binding_sets_.erase(it); 5264 binding_sets_.erase(it);
5265 } 5265 }
5266 5266
5267 } // namespace content 5267 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698