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_VIEWS_ECHO_DIALOG_VIEWS_CHROMEOS_H_ | |
6 #define CHROME_BROWSER_UI_VIEWS_ECHO_DIALOG_VIEWS_CHROMEOS_H_ | |
7 | |
8 #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.
| |
9 #include "chrome/browser/ui/echo_dialog_chromeos.h" | |
10 #include "ui/views/controls/link_listener.h" | |
11 #include "ui/views/window/dialog_delegate.h" | |
12 | |
13 namespace views { | |
14 class EchoDialogListener; | |
tfarina
2013/02/26 19:13:00
remove this.
tbarzic
2013/02/26 19:34:55
Done.
| |
15 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.
| |
16 } | |
17 | |
18 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.
| |
19 | |
20 class EchoDialogView : public EchoDialog, | |
21 public views::DialogDelegateView, | |
22 public views::LinkListener { | |
23 public: | |
24 explicit EchoDialogView(EchoDialog::Listener* listener); | |
25 virtual ~EchoDialogView(); | |
26 | |
27 // EchoDialog overrides. | |
tfarina
2013/02/26 19:16:49
Can you make those overrides private?
tbarzic
2013/02/26 19:34:55
Done.
| |
28 virtual void InitForEnabledEcho(const string16& service_name, | |
29 const string16& origin) OVERRIDE; | |
30 virtual void InitForDisabledEcho() OVERRIDE; | |
31 virtual void Show(gfx::NativeWindow parent) OVERRIDE; | |
32 | |
33 // views::DialogDelegate overrides. | |
34 virtual int GetDialogButtons() const OVERRIDE; | |
35 virtual int GetDefaultDialogButton() const OVERRIDE; | |
36 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; | |
37 virtual bool Cancel() OVERRIDE; | |
38 virtual bool Accept() OVERRIDE; | |
39 | |
40 // views::WidgetDelegate overrides. | |
41 virtual ui::ModalType GetModalType() const OVERRIDE; | |
42 virtual bool ShouldShowWindowTitle() const OVERRIDE; | |
43 virtual bool ShouldShowWindowIcon() const OVERRIDE; | |
44 | |
45 // views::LinkListener override. | |
46 // 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.
| |
47 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | |
48 | |
49 private: | |
50 EchoDialog::Listener* listener_; | |
51 int ok_button_label_id_; | |
52 int cancel_button_label_id_; | |
53 | |
54 DISALLOW_COPY_AND_ASSIGN(EchoDialogView); | |
55 }; | |
56 | |
57 } // namespace views | |
58 | |
59 #endif // CHROME_BROWSER_UI_VIEWS_ECHO_DIALOG_VIEWS_CHROMEOS_H_ | |
60 | |
OLD | NEW |