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

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: Fix comments and reset session id appropriately 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // Reloading can be disabled e. g. for the DevTools window. 151 // Reloading can be disabled e. g. for the DevTools window.
152 virtual bool CanReloadContents(TabContents* source) const; 152 virtual bool CanReloadContents(TabContents* source) const;
153 153
154 // Show a dialog with HTML content. |delegate| contains a pointer to the 154 // Show a dialog with HTML content. |delegate| contains a pointer to the
155 // delegate who knows how to display the dialog (which file URL and JSON 155 // delegate who knows how to display the dialog (which file URL and JSON
156 // string input to use during initialization). |parent_window| is the window 156 // string input to use during initialization). |parent_window| is the window
157 // that should be parent of the dialog, or NULL for the default. 157 // that should be parent of the dialog, or NULL for the default.
158 virtual void ShowHtmlDialog(HtmlDialogUIDelegate* delegate, 158 virtual void ShowHtmlDialog(HtmlDialogUIDelegate* delegate,
159 gfx::NativeWindow parent_window); 159 gfx::NativeWindow parent_window);
160 160
161 // Invoked prior to showing before unload handler confirmation dialog.
162 virtual void WillRunBeforeUnloadConfirm();
163
161 // Returns true if javascript dialogs and unload alerts are suppressed. 164 // Returns true if javascript dialogs and unload alerts are suppressed.
162 // Default is false. 165 // Default is false.
163 virtual bool ShouldSuppressDialogs(); 166 virtual bool ShouldSuppressDialogs();
164 167
165 // Tells us that we've finished firing this tab's beforeunload event. 168 // Tells us that we've finished firing this tab's beforeunload event.
166 // The proceed bool tells us whether the user chose to proceed closing the 169 // The proceed bool tells us whether the user chose to proceed closing the
167 // tab. Returns true if the tab can continue on firing it's unload event. 170 // tab. Returns true if the tab can continue on firing it's unload event.
168 // If we're closing the entire browser, then we'll want to delay firing 171 // If we're closing the entire browser, then we'll want to delay firing
169 // unload events until all the beforeunload events have fired. 172 // unload events until all the beforeunload events have fired.
170 virtual void BeforeUnloadFired(TabContents* tab, 173 virtual void BeforeUnloadFired(TabContents* tab,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 319
317 // Notifies the delegate that the content restrictions for this tab has 320 // Notifies the delegate that the content restrictions for this tab has
318 // changed. 321 // changed.
319 virtual void ContentRestrictionsChanged(TabContents* source); 322 virtual void ContentRestrictionsChanged(TabContents* source);
320 323
321 protected: 324 protected:
322 virtual ~TabContentsDelegate(); 325 virtual ~TabContentsDelegate();
323 }; 326 };
324 327
325 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_ 328 #endif // CHROME_BROWSER_TAB_CONTENTS_TAB_CONTENTS_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/tab_contents.cc ('k') | chrome/browser/tab_contents/tab_contents_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698