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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #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.
6 #define CHROME_BROWSER_UI_ECHO_DIALOG_CHROMEOS_H_
7
8 #include "base/string16.h"
9 #include "ui/gfx/native_widget_types.h"
10
11 class EchoDialogListener;
12
13 // Dialog shown by echoPrivate extension API when getUserConsent function is
14 // called. The API is used by echo extension when an offer from a service is
15 // being redeemed. The dialog is shown to get an user consent. If the echo
16 // extension is not allowed by policy to redeem offers, the dialog informs user
17 // about this.
18 // 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.
19 class EchoDialog {
20 public:
21 virtual ~EchoDialog() {}
22
23 // Creates platform specific (only ChromeOS) implementation of EchoDialog.
24 // Implementation in chrome/browser/ui/views/echo_dialog_views_chromeos.cc
25 static EchoDialog* Create(EchoDialogListener* listener);
26
27 // Initializes dialog layout that will be showed when echo extension is
28 // allowed to redeem offers. |service_name| is the name of the service that
29 // requests user consent to redeem an offer. |origin| is the service's origin
30 // url. Service name should be underlined in the dialog, and hovering over its
31 // label should display tooltip containing |origin|.
32 // The dialog will have both OK and Cancel buttons.
33 virtual void InitForEnabledEcho(const string16& service_name,
34 const string16& origin) = 0;
35
36 // Initializes dialog layout that will be shown when echo extension is not
37 // allowed to redeem offers. The dialog will be showing a message that the
38 // offer redeeming is disabled by policy.
39 // The dialog will have only Cancel button.
40 virtual void InitForDisabledEcho() = 0;
41
42 // Shows the dialog.
43 virtual void Show(gfx::NativeWindow parent) = 0;
44 };
45
46 #endif // CHROME_BROWSER_UI_ECHO_DIALOG_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698