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

Unified Diff: chrome/browser/ui/echo_dialog_chromeos.h

Issue 12317109: Add a dialog for getting user consent in the echo redeem flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forgot to add echo_dialog_listener file Created 7 years, 10 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/echo_dialog_chromeos.h
diff --git a/chrome/browser/ui/echo_dialog_chromeos.h b/chrome/browser/ui/echo_dialog_chromeos.h
new file mode 100644
index 0000000000000000000000000000000000000000..636a374deddd6686127176eb46b5278aa22c4b48
--- /dev/null
+++ b/chrome/browser/ui/echo_dialog_chromeos.h
@@ -0,0 +1,46 @@
+// Copyright 2013 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_ECHO_DIALOG_CHROMEOS_H_
sky 2013/02/26 21:28:48 Is there a reason this file is here and not in som
tbarzic 2013/02/26 23:08:50 Not really.. I'll move these to c/b/chromeos/ui
tbarzic 2013/03/18 18:21:58 Done.
+#define CHROME_BROWSER_UI_ECHO_DIALOG_CHROMEOS_H_
+
+#include "base/string16.h"
+#include "ui/gfx/native_widget_types.h"
+
+class EchoDialogListener;
+
+// Dialog shown by echoPrivate extension API when getUserConsent function is
+// called. The API is used by echo extension when an offer from a service is
+// being redeemed. The dialog is shown to get an user consent. If the echo
+// extension is not allowed by policy to redeem offers, the dialog informs user
+// about this.
+// This is ChromeOS-only dialog.
sky 2013/02/26 21:28:48 Remove this comment since the file is named _chrom
tbarzic 2013/03/18 18:21:58 Done.
+class EchoDialog {
+ public:
+ virtual ~EchoDialog() {}
+
+ // Creates platform specific (only ChromeOS) implementation of EchoDialog.
+ // Implementation in chrome/browser/ui/views/echo_dialog_views_chromeos.cc
+ static EchoDialog* Create(EchoDialogListener* listener);
+
+ // Initializes dialog layout that will be showed when echo extension is
+ // allowed to redeem offers. |service_name| is the name of the service that
+ // requests user consent to redeem an offer. |origin| is the service's origin
+ // url. Service name should be underlined in the dialog, and hovering over its
+ // label should display tooltip containing |origin|.
+ // The dialog will have both OK and Cancel buttons.
+ virtual void InitForEnabledEcho(const string16& service_name,
+ const string16& origin) = 0;
+
+ // Initializes dialog layout that will be shown when echo extension is not
+ // allowed to redeem offers. The dialog will be showing a message that the
+ // offer redeeming is disabled by policy.
+ // The dialog will have only Cancel button.
+ virtual void InitForDisabledEcho() = 0;
+
+ // Shows the dialog.
+ virtual void Show(gfx::NativeWindow parent) = 0;
+};
+
+#endif // CHROME_BROWSER_UI_ECHO_DIALOG_CHROMEOS_H_

Powered by Google App Engine
This is Rietveld 408576698