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

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

Issue 2194243002: Suppress JavaScript dialogs when a tab puts itself into fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: switch fullscreen call Created 4 years, 4 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // Invoked when a vertical overscroll completes. 176 // Invoked when a vertical overscroll completes.
177 virtual void OverscrollComplete() {} 177 virtual void OverscrollComplete() {}
178 178
179 // Return the rect where to display the resize corner, if any, otherwise 179 // Return the rect where to display the resize corner, if any, otherwise
180 // an empty rect. 180 // an empty rect.
181 virtual gfx::Rect GetRootWindowResizerRect() const; 181 virtual gfx::Rect GetRootWindowResizerRect() const;
182 182
183 // Invoked prior to showing before unload handler confirmation dialog. 183 // Invoked prior to showing before unload handler confirmation dialog.
184 virtual void WillRunBeforeUnloadConfirm() {} 184 virtual void WillRunBeforeUnloadConfirm() {}
185 185
186 // Returns true if javascript dialogs and unload alerts are suppressed. 186 // Returns true if JavaScript dialogs and onbeforeunload requests are
187 // Default is false. 187 // suppressed. |before_unload| is true if the dialog is an onbeforeunload
188 virtual bool ShouldSuppressDialogs(WebContents* source); 188 // request. The default is false, to not suppress dialogs.
189 virtual bool ShouldSuppressDialogs(WebContents* source, bool before_unload);
189 190
190 // Returns whether pending NavigationEntries for aborted browser-initiated 191 // Returns whether pending NavigationEntries for aborted browser-initiated
191 // navigations should be preserved (and thus returned from GetVisibleURL). 192 // navigations should be preserved (and thus returned from GetVisibleURL).
192 // Defaults to false. 193 // Defaults to false.
193 virtual bool ShouldPreserveAbortedURLs(WebContents* source); 194 virtual bool ShouldPreserveAbortedURLs(WebContents* source);
194 195
195 // Add a message to the console. Returning true indicates that the delegate 196 // Add a message to the console. Returning true indicates that the delegate
196 // handled the message. If false is returned the default logging mechanism 197 // handled the message. If false is returned the default logging mechanism
197 // will be used for the message. 198 // will be used for the message.
198 virtual bool AddMessageToConsole(WebContents* source, 199 virtual bool AddMessageToConsole(WebContents* source,
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 // Called when |this| is no longer the WebContentsDelegate for |source|. 542 // Called when |this| is no longer the WebContentsDelegate for |source|.
542 void Detach(WebContents* source); 543 void Detach(WebContents* source);
543 544
544 // The WebContents that this is currently a delegate for. 545 // The WebContents that this is currently a delegate for.
545 std::set<WebContents*> attached_contents_; 546 std::set<WebContents*> attached_contents_;
546 }; 547 };
547 548
548 } // namespace content 549 } // namespace content
549 550
550 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_DELEGATE_H_ 551 #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