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

Side by Side Diff: content/public/browser/web_contents_delegate.h

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 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // OpenURL() for these cases which does it for you). 88 // OpenURL() for these cases which does it for you).
89 89
90 // Returns the WebContents the URL is opened in, or nullptr if the URL wasn't 90 // Returns the WebContents the URL is opened in, or nullptr if the URL wasn't
91 // opened immediately. 91 // opened immediately.
92 virtual WebContents* OpenURLFromTab(WebContents* source, 92 virtual WebContents* OpenURLFromTab(WebContents* source,
93 const OpenURLParams& params); 93 const OpenURLParams& params);
94 94
95 // Allows the delegate to optionally cancel navigations that attempt to 95 // Allows the delegate to optionally cancel navigations that attempt to
96 // transfer to a different process between the start of the network load and 96 // transfer to a different process between the start of the network load and
97 // commit. Defaults to true. 97 // commit. Defaults to true.
98 virtual bool ShouldTransferNavigation(); 98 virtual bool ShouldTransferNavigation(bool is_main_frame_navigation);
99 99
100 // Called to inform the delegate that the WebContents's navigation state 100 // Called to inform the delegate that the WebContents's navigation state
101 // changed. The |changed_flags| indicates the parts of the navigation state 101 // changed. The |changed_flags| indicates the parts of the navigation state
102 // that have been updated. 102 // that have been updated.
103 virtual void NavigationStateChanged(WebContents* source, 103 virtual void NavigationStateChanged(WebContents* source,
104 InvalidateTypes changed_flags) {} 104 InvalidateTypes changed_flags) {}
105 105
106 // Called to inform the delegate that the WebContent's visible SSL state (as 106 // Called to inform the delegate that the WebContent's visible SSL state (as
107 // defined by SSLStatus) changed. 107 // defined by SSLStatus) changed.
108 virtual void VisibleSSLStateChanged(const WebContents* source) {} 108 virtual void VisibleSSLStateChanged(const WebContents* source) {}
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 // Called when |this| is no longer the WebContentsDelegate for |source|. 541 // Called when |this| is no longer the WebContentsDelegate for |source|.
542 void Detach(WebContents* source); 542 void Detach(WebContents* source);
543 543
544 // The WebContents that this is currently a delegate for. 544 // The WebContents that this is currently a delegate for.
545 std::set<WebContents*> attached_contents_; 545 std::set<WebContents*> attached_contents_;
546 }; 546 };
547 547
548 } // namespace content 548 } // namespace content
549 549
550 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 550 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/web_contents_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698