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

Unified Diff: chrome/browser/ui/views/echo_dialog_views_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: 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/views/echo_dialog_views_chromeos.h
diff --git a/chrome/browser/ui/views/echo_dialog_views_chromeos.h b/chrome/browser/ui/views/echo_dialog_views_chromeos.h
new file mode 100644
index 0000000000000000000000000000000000000000..e96525cbb9b5b7d41b11711b7cc1e1f0e563e707
--- /dev/null
+++ b/chrome/browser/ui/views/echo_dialog_views_chromeos.h
@@ -0,0 +1,60 @@
+// 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_VIEWS_ECHO_DIALOG_VIEWS_CHROMEOS_H_
+#define CHROME_BROWSER_UI_VIEWS_ECHO_DIALOG_VIEWS_CHROMEOS_H_
+
+#include "base/memory/scoped_ptr.h"
tfarina 2013/02/26 19:16:49 you don't need this include, instead include basic
tbarzic 2013/02/26 19:34:55 Done.
+#include "chrome/browser/ui/echo_dialog_chromeos.h"
+#include "ui/views/controls/link_listener.h"
+#include "ui/views/window/dialog_delegate.h"
+
+namespace views {
+class EchoDialogListener;
tfarina 2013/02/26 19:13:00 remove this.
tbarzic 2013/02/26 19:34:55 Done.
+class Link;
tfarina 2013/02/26 19:16:49 you don't need this forward declaration either, bc
tbarzic 2013/02/26 19:34:55 Done.
+}
+
+namespace views {
tfarina 2013/02/26 19:16:49 also, no namespace. This isn't in ui/views/ so we
tbarzic 2013/02/26 19:34:55 Done.
+
+class EchoDialogView : public EchoDialog,
+ public views::DialogDelegateView,
+ public views::LinkListener {
+ public:
+ explicit EchoDialogView(EchoDialog::Listener* listener);
+ virtual ~EchoDialogView();
+
+ // EchoDialog overrides.
tfarina 2013/02/26 19:16:49 Can you make those overrides private?
tbarzic 2013/02/26 19:34:55 Done.
+ virtual void InitForEnabledEcho(const string16& service_name,
+ const string16& origin) OVERRIDE;
+ virtual void InitForDisabledEcho() OVERRIDE;
+ virtual void Show(gfx::NativeWindow parent) OVERRIDE;
+
+ // views::DialogDelegate overrides.
+ virtual int GetDialogButtons() const OVERRIDE;
+ virtual int GetDefaultDialogButton() const OVERRIDE;
+ virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE;
+ virtual bool Cancel() OVERRIDE;
+ virtual bool Accept() OVERRIDE;
+
+ // views::WidgetDelegate overrides.
+ virtual ui::ModalType GetModalType() const OVERRIDE;
+ virtual bool ShouldShowWindowTitle() const OVERRIDE;
+ virtual bool ShouldShowWindowIcon() const OVERRIDE;
+
+ // views::LinkListener override.
+ // Observes "More info" link in the dialog content.
tfarina 2013/02/26 19:16:49 do you need this comment? I think it's redundant.
tbarzic 2013/02/26 19:34:55 Done.
+ virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
+
+ private:
+ EchoDialog::Listener* listener_;
+ int ok_button_label_id_;
+ int cancel_button_label_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(EchoDialogView);
+};
+
+} // namespace views
+
+#endif // CHROME_BROWSER_UI_VIEWS_ECHO_DIALOG_VIEWS_CHROMEOS_H_
+

Powered by Google App Engine
This is Rietveld 408576698