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

Side by Side Diff: chrome/browser/tab_contents/tab_contents_delegate.h

Issue 5610005: Makes instant run before unload listeners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Better comments Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 // Reloading can be disabled e. g. for the DevTools window. 147 // Reloading can be disabled e. g. for the DevTools window.
148 virtual bool CanReloadContents(TabContents* source) const; 148 virtual bool CanReloadContents(TabContents* source) const;
149 149
150 // Show a dialog with HTML content. |delegate| contains a pointer to the 150 // Show a dialog with HTML content. |delegate| contains a pointer to the
151 // delegate who knows how to display the dialog (which file URL and JSON 151 // delegate who knows how to display the dialog (which file URL and JSON
152 // string input to use during initialization). |parent_window| is the window 152 // string input to use during initialization). |parent_window| is the window
153 // that should be parent of the dialog, or NULL for the default. 153 // that should be parent of the dialog, or NULL for the default.
154 virtual void ShowHtmlDialog(HtmlDialogUIDelegate* delegate, 154 virtual void ShowHtmlDialog(HtmlDialogUIDelegate* delegate,
155 gfx::NativeWindow parent_window); 155 gfx::NativeWindow parent_window);
156 156
157 // Invoked prior to showing before unload handler confirmation dialog.
Charlie Reis 2010/12/08 01:26:12 What about unload handlers? Or is that a TODO?
sky 2010/12/08 03:04:22 No, this is only invoked for 'before unload' handl
158 virtual void WillRunBeforeUnloadConfirm();
159
157 // Returns true if javascript dialogs and unload alerts are suppressed. 160 // Returns true if javascript dialogs and unload alerts are suppressed.
158 // Default is false. 161 // Default is false.
159 virtual bool ShouldSuppressDialogs(); 162 virtual bool ShouldSuppressDialogs();
160 163
161 // Tells us that we've finished firing this tab's beforeunload event. 164 // Tells us that we've finished firing this tab's beforeunload event.
162 // The proceed bool tells us whether the user chose to proceed closing the 165 // The proceed bool tells us whether the user chose to proceed closing the
163 // tab. Returns true if the tab can continue on firing it's unload event. 166 // tab. Returns true if the tab can continue on firing it's unload event.
164 // If we're closing the entire browser, then we'll want to delay firing 167 // If we're closing the entire browser, then we'll want to delay firing
165 // unload events until all the beforeunload events have fired. 168 // unload events until all the beforeunload events have fired.
166 virtual void BeforeUnloadFired(TabContents* tab, 169 virtual void BeforeUnloadFired(TabContents* tab,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 315
313 // Notifies the delegate that the content restrictions for this tab has 316 // Notifies the delegate that the content restrictions for this tab has
314 // changed. 317 // changed.
315 virtual void ContentRestrictionsChanged(TabContents* source); 318 virtual void ContentRestrictionsChanged(TabContents* source);
316 319
317 protected: 320 protected:
318 virtual ~TabContentsDelegate(); 321 virtual ~TabContentsDelegate();
319 }; 322 };
320 323
321 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ 324 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698