Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |