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

Unified Diff: ios/chrome/browser/ui/dialogs/java_script_dialog_presenter_impl.h

Issue 2588713002: Upstream Chrome on iOS source code [4/11]. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/dialogs/java_script_dialog_presenter_impl.h
diff --git a/ios/chrome/browser/ui/dialogs/java_script_dialog_presenter_impl.h b/ios/chrome/browser/ui/dialogs/java_script_dialog_presenter_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..eec3ef2b00cfee97b9d0ec679a7ff524e7a51b63
--- /dev/null
+++ b/ios/chrome/browser/ui/dialogs/java_script_dialog_presenter_impl.h
@@ -0,0 +1,36 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_UI_DIALOGS_JAVA_SCRIPT_DIALOG_PRESENTER_IMPL_H_
+#define IOS_CHROME_BROWSER_UI_DIALOGS_JAVA_SCRIPT_DIALOG_PRESENTER_IMPL_H_
+
+#import "base/ios/weak_nsobject.h"
+#import "base/mac/scoped_nsobject.h"
+#include "ios/web/public/java_script_dialog_presenter.h"
+
+@class AlertCoordinator;
+@class DialogPresenter;
+
+class JavaScriptDialogPresenterImpl : public web::JavaScriptDialogPresenter {
+ public:
+ explicit JavaScriptDialogPresenterImpl(DialogPresenter* dialogPresenter);
+ ~JavaScriptDialogPresenterImpl();
+
+ void RunJavaScriptDialog(web::WebState* web_state,
+ const GURL& origin_url,
+ web::JavaScriptDialogType dialog_type,
+ NSString* message_text,
+ NSString* default_prompt_text,
+ const web::DialogClosedCallback& callback) override;
+
+ void CancelDialogs(web::WebState* web_state) override;
+
+ private:
+ // The underlying DialogPresenter handling the dialog UI.
+ base::scoped_nsobject<DialogPresenter> dialog_presenter_;
+
+ DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogPresenterImpl);
+};
+
+#endif // IOS_CHROME_BROWSER_UI_DIALOGS_JAVA_SCRIPT_DIALOG_PRESENTER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698