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

Side by Side Diff: content/public/browser/web_contents_delegate.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
« no previous file with comments | « content/public/browser/web_contents_delegate.h ('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/public/browser/web_contents_delegate.h" 5 #include "content/public/browser/web_contents_delegate.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "content/public/browser/render_view_host.h" 11 #include "content/public/browser/render_view_host.h"
12 #include "content/public/browser/security_style_explanations.h" 12 #include "content/public/browser/security_style_explanations.h"
13 #include "content/public/browser/web_contents.h" 13 #include "content/public/browser/web_contents.h"
14 #include "content/public/common/bindings_policy.h" 14 #include "content/public/common/bindings_policy.h"
15 #include "content/public/common/security_style.h" 15 #include "content/public/common/security_style.h"
16 #include "content/public/common/url_constants.h" 16 #include "content/public/common/url_constants.h"
17 #include "ui/gfx/geometry/rect.h" 17 #include "ui/gfx/geometry/rect.h"
18 18
19 namespace content { 19 namespace content {
20 20
21 WebContentsDelegate::WebContentsDelegate() { 21 WebContentsDelegate::WebContentsDelegate() {
22 } 22 }
23 23
24 WebContents* WebContentsDelegate::OpenURLFromTab(WebContents* source, 24 WebContents* WebContentsDelegate::OpenURLFromTab(WebContents* source,
25 const OpenURLParams& params) { 25 const OpenURLParams& params) {
26 return nullptr; 26 return nullptr;
27 } 27 }
28 28
29 bool WebContentsDelegate::ShouldTransferNavigation() { 29 bool WebContentsDelegate::ShouldTransferNavigation(
30 bool is_main_frame_navigation) {
30 return true; 31 return true;
31 } 32 }
32 33
33 bool WebContentsDelegate::IsPopupOrPanel(const WebContents* source) const { 34 bool WebContentsDelegate::IsPopupOrPanel(const WebContents* source) const {
34 return false; 35 return false;
35 } 36 }
36 37
37 bool WebContentsDelegate::CanOverscrollContent() const { return false; } 38 bool WebContentsDelegate::CanOverscrollContent() const { return false; }
38 39
39 gfx::Rect WebContentsDelegate::GetRootWindowResizerRect() const { 40 gfx::Rect WebContentsDelegate::GetRootWindowResizerRect() const {
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 void WebContentsDelegate::ShowCertificateViewerInDevTools( 256 void WebContentsDelegate::ShowCertificateViewerInDevTools(
256 WebContents* web_contents, 257 WebContents* web_contents,
257 int cert_id) { 258 int cert_id) {
258 } 259 }
259 260
260 void WebContentsDelegate::RequestAppBannerFromDevTools( 261 void WebContentsDelegate::RequestAppBannerFromDevTools(
261 content::WebContents* web_contents) { 262 content::WebContents* web_contents) {
262 } 263 }
263 264
264 } // namespace content 265 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698