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

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

Issue 10868116: Pass result of blockage across content API when new tab blocked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
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 <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 virtual void NavigationStateChanged(const WebContents* source, 88 virtual void NavigationStateChanged(const WebContents* source,
89 unsigned changed_flags) {} 89 unsigned changed_flags) {}
90 90
91 // Adds the navigation request headers to |headers|. Use 91 // Adds the navigation request headers to |headers|. Use
92 // net::HttpUtil::AppendHeaderIfMissing to build the set of headers. 92 // net::HttpUtil::AppendHeaderIfMissing to build the set of headers.
93 virtual void AddNavigationHeaders(const GURL& url, std::string* headers) {} 93 virtual void AddNavigationHeaders(const GURL& url, std::string* headers) {}
94 94
95 // Creates a new tab with the already-created WebContents 'new_contents'. 95 // Creates a new tab with the already-created WebContents 'new_contents'.
96 // The window for the added contents should be reparented correctly when this 96 // The window for the added contents should be reparented correctly when this
97 // method returns. If |disposition| is NEW_POPUP, |pos| should hold the 97 // method returns. If |disposition| is NEW_POPUP, |pos| should hold the
98 // initial position. 98 // initial position. Returns false if the tab is blocked.
99 virtual void AddNewContents(WebContents* source, 99 virtual bool AddNewContents(WebContents* source,
100 WebContents* new_contents, 100 WebContents* new_contents,
101 WindowOpenDisposition disposition, 101 WindowOpenDisposition disposition,
102 const gfx::Rect& initial_pos, 102 const gfx::Rect& initial_pos,
103 bool user_gesture) {} 103 bool user_gesture);
104 104
105 // Selects the specified contents, bringing its container to the front. 105 // Selects the specified contents, bringing its container to the front.
106 virtual void ActivateContents(WebContents* contents) {} 106 virtual void ActivateContents(WebContents* contents) {}
107 107
108 // Deactivates the specified contents by deactivating its container and 108 // Deactivates the specified contents by deactivating its container and
109 // potentialy moving it to the back of the Z order. 109 // potentialy moving it to the back of the Z order.
110 virtual void DeactivateContents(WebContents* contents) {} 110 virtual void DeactivateContents(WebContents* contents) {}
111 111
112 // Notifies the delegate that this contents is starting or is done loading 112 // Notifies the delegate that this contents is starting or is done loading
113 // some resource. The delegate should use this notification to represent 113 // some resource. The delegate should use this notification to represent
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 // Called when |this| is no longer the WebContentsDelegate for |source|. 440 // Called when |this| is no longer the WebContentsDelegate for |source|.
441 void Detach(WebContents* source); 441 void Detach(WebContents* source);
442 442
443 // The WebContents that this is currently a delegate for. 443 // The WebContents that this is currently a delegate for.
444 std::set<WebContents*> attached_contents_; 444 std::set<WebContents*> attached_contents_;
445 }; 445 };
446 446
447 } // namespace content 447 } // namespace content
448 448
449 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 449 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698