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

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

Issue 2412843002: Simplify the JavaScriptDialogManager. (Closed)
Patch Set: braces Created 4 years, 2 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_JAVASCRIPT_DIALOG_MANAGER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_
6 #define CONTENT_PUBLIC_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_ 6 #define CONTENT_PUBLIC_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 const DialogClosedCallback& callback) = 0; 43 const DialogClosedCallback& callback) = 0;
44 44
45 // Accepts or dismisses the active JavaScript dialog, which must be owned 45 // Accepts or dismisses the active JavaScript dialog, which must be owned
46 // by the given |web_contents|. If |prompt_override| is not null, the prompt 46 // by the given |web_contents|. If |prompt_override| is not null, the prompt
47 // text of the dialog should be set before accepting. Returns true if the 47 // text of the dialog should be set before accepting. Returns true if the
48 // dialog was handled. 48 // dialog was handled.
49 virtual bool HandleJavaScriptDialog(WebContents* web_contents, 49 virtual bool HandleJavaScriptDialog(WebContents* web_contents,
50 bool accept, 50 bool accept,
51 const base::string16* prompt_override); 51 const base::string16* prompt_override);
52 52
53 // Cancels all active and pending dialogs for the given WebContents. 53 // Cancels all active and pending dialogs for the given WebContents. If
54 virtual void CancelActiveAndPendingDialogs(WebContents* web_contents) = 0; 54 // |suppress_callbacks| is true, suppresses the calls to callbacks while
55 55 // canceling those dialogs. If |reset_state| is true, resets any saved state
56 // Reset any saved state tied to the given WebContents. 56 // tied to |web_contents|.
57 virtual void ResetDialogState(WebContents* web_contents) = 0; 57 virtual void CancelDialogs(WebContents* web_contents,
58 bool suppress_callbacks,
59 bool reset_state) = 0;
58 60
59 virtual ~JavaScriptDialogManager() {} 61 virtual ~JavaScriptDialogManager() {}
60 }; 62 };
61 63
62 } // namespace content 64 } // namespace content
63 65
64 #endif // CONTENT_PUBLIC_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_ 66 #endif // CONTENT_PUBLIC_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/shell/browser/shell_javascript_dialog_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698