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

Unified Diff: chrome/browser/ui/javascript_dialogs/javascript_dialog_views.h

Issue 2450173003: Add a Cocoa version of the auto-dismissing dialog. (Closed)
Patch Set: rsesek 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/javascript_dialogs/javascript_dialog_views.h
diff --git a/chrome/browser/ui/javascript_dialogs/javascript_dialog_views.h b/chrome/browser/ui/javascript_dialogs/javascript_dialog_views.h
index dd8b0080e89854ecbd413481e19173c6e2a4bbde..7ecaef55656d4711bb50d4934e9ead4589b602c2 100644
--- a/chrome/browser/ui/javascript_dialogs/javascript_dialog_views.h
+++ b/chrome/browser/ui/javascript_dialogs/javascript_dialog_views.h
@@ -8,7 +8,7 @@
#include <memory>
#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
+#include "chrome/browser/ui/javascript_dialogs/javascript_dialog.h"
#include "content/public/browser/javascript_dialog_manager.h"
#include "ui/views/window/dialog_delegate.h"
@@ -19,7 +19,8 @@ class MessageBoxView;
// A Views version of a JavaScript dialog that automatically dismisses itself
// when the user switches away to a different tab, used for WebContentses that
// are browser tabs.
-class JavaScriptDialogViews : public views::DialogDelegate {
+class JavaScriptDialogViews : public JavaScriptDialog,
+ public views::DialogDelegate {
public:
~JavaScriptDialogViews() override;
@@ -33,11 +34,8 @@ class JavaScriptDialogViews : public views::DialogDelegate {
const content::JavaScriptDialogManager::DialogClosedCallback&
dialog_callback);
- // Closes the dialog without sending a callback. This is useful when the
- // JavaScriptDialogTabHelper needs to make this dialog go away so that it can
- // respond to a call that requires it to make no callback or make a customized
- // one.
- void CloseDialogWithoutCallback();
+ // JavaScriptDialog:
+ void CloseDialogWithoutCallback() override;
// views::DialogDelegate:
int GetDefaultDialogButton() const override;
« no previous file with comments | « chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698