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

Unified Diff: chrome/browser/ui/webui/repost_form_warning_ui.h

Issue 7828065: chromeos: Add WebUI implementation of form repost dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't crash on empty response Created 9 years, 3 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
Index: chrome/browser/ui/webui/repost_form_warning_ui.h
diff --git a/chrome/browser/ui/webui/repost_form_warning_ui.h b/chrome/browser/ui/webui/repost_form_warning_ui.h
new file mode 100644
index 0000000000000000000000000000000000000000..9f5bbe80d25e0f8d0293810b9b9ed87c0d271e4c
--- /dev/null
+++ b/chrome/browser/ui/webui/repost_form_warning_ui.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2011 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 CHROME_BROWSER_UI_WEBUI_REPOST_FORM_WARNING_UI_H_
+#define CHROME_BROWSER_UI_WEBUI_REPOST_FORM_WARNING_UI_H_
+#pragma once
+
+#include "base/memory/scoped_ptr.h"
+#include "ui/gfx/native_widget_types.h"
+
+class RepostFormWarningController;
+class TabContents;
+
+// Displays a dialog that warns the user that they are about to resubmit
+// a form.
+// To display the dialog, allocate this object on the heap. It will open the
+// dialog from its constructor and then delete itself when the user dismisses
+// the dialog.
+class RepostFormWarningUI {
+ public:
+ // Use BrowserWindow::ShowRepostFormWarningDialog to use.
+ RepostFormWarningUI(gfx::NativeWindow parent_window,
arv (Not doing code reviews) 2011/09/07 20:58:20 If you don't want this to be used can you make the
Daniel Erat 2011/09/08 01:46:56 Sounds reasonable to me. Done.
+ TabContents* tab_contents);
+
+ // Invoked when the dialog is closed. Notifies the controller of the user's
+ // response and deletes this object.
+ void OnDialogClosed(bool repost);
+
+ private:
+ virtual ~RepostFormWarningUI();
+
+ scoped_ptr<RepostFormWarningController> controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(RepostFormWarningUI);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_REPOST_FORM_WARNING_UI_H_

Powered by Google App Engine
This is Rietveld 408576698