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

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

Issue 232463007: Don't leave aborted URLs in the omnibox unless we're on a new tab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments Created 6 years, 8 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // an empty rect. 166 // an empty rect.
167 virtual gfx::Rect GetRootWindowResizerRect() const; 167 virtual gfx::Rect GetRootWindowResizerRect() const;
168 168
169 // Invoked prior to showing before unload handler confirmation dialog. 169 // Invoked prior to showing before unload handler confirmation dialog.
170 virtual void WillRunBeforeUnloadConfirm() {} 170 virtual void WillRunBeforeUnloadConfirm() {}
171 171
172 // Returns true if javascript dialogs and unload alerts are suppressed. 172 // Returns true if javascript dialogs and unload alerts are suppressed.
173 // Default is false. 173 // Default is false.
174 virtual bool ShouldSuppressDialogs(); 174 virtual bool ShouldSuppressDialogs();
175 175
176 // Returns whether pending NavigationEntries for aborted browser-initiated
177 // navigations should be preserved (and thus returned from GetVisibleURL).
178 // Defaults to false.
179 virtual bool ShouldPreserveAbortedURLs(WebContents* source);
180
176 // Add a message to the console. Returning true indicates that the delegate 181 // Add a message to the console. Returning true indicates that the delegate
177 // handled the message. If false is returned the default logging mechanism 182 // handled the message. If false is returned the default logging mechanism
178 // will be used for the message. 183 // will be used for the message.
179 virtual bool AddMessageToConsole(WebContents* source, 184 virtual bool AddMessageToConsole(WebContents* source,
180 int32 level, 185 int32 level,
181 const base::string16& message, 186 const base::string16& message,
182 int32 line_no, 187 int32 line_no,
183 const base::string16& source_id); 188 const base::string16& source_id);
184 189
185 // Tells us that we've finished firing this tab's beforeunload event. 190 // Tells us that we've finished firing this tab's beforeunload event.
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 // Called when |this| is no longer the WebContentsDelegate for |source|. 478 // Called when |this| is no longer the WebContentsDelegate for |source|.
474 void Detach(WebContents* source); 479 void Detach(WebContents* source);
475 480
476 // The WebContents that this is currently a delegate for. 481 // The WebContents that this is currently a delegate for.
477 std::set<WebContents*> attached_contents_; 482 std::set<WebContents*> attached_contents_;
478 }; 483 };
479 484
480 } // namespace content 485 } // namespace content
481 486
482 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 487 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698