| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_UI_ECHO_DIALOG_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_UI_ECHO_DIALOG_VIEW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_UI_ECHO_DIALOG_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_UI_ECHO_DIALOG_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ui/views/controls/styled_label_listener.h" | 10 #include "ui/views/controls/styled_label_listener.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // The dialog will have only Cancel button. | 43 // The dialog will have only Cancel button. |
| 44 void InitForDisabledEcho(); | 44 void InitForDisabledEcho(); |
| 45 | 45 |
| 46 // Shows the dialog. | 46 // Shows the dialog. |
| 47 void Show(gfx::NativeWindow parent); | 47 void Show(gfx::NativeWindow parent); |
| 48 | 48 |
| 49 private: | 49 private: |
| 50 friend class ExtensionEchoPrivateApiTest; | 50 friend class ExtensionEchoPrivateApiTest; |
| 51 | 51 |
| 52 // views::DialogDelegate overrides. | 52 // views::DialogDelegate overrides. |
| 53 virtual int GetDialogButtons() const OVERRIDE; | 53 virtual int GetDialogButtons() const override; |
| 54 virtual int GetDefaultDialogButton() const OVERRIDE; | 54 virtual int GetDefaultDialogButton() const override; |
| 55 virtual base::string16 GetDialogButtonLabel(ui::DialogButton button) const OVE
RRIDE; | 55 virtual base::string16 GetDialogButtonLabel( |
| 56 virtual bool Cancel() OVERRIDE; | 56 ui::DialogButton button) const override; |
| 57 virtual bool Accept() OVERRIDE; | 57 virtual bool Cancel() override; |
| 58 virtual bool Accept() override; |
| 58 | 59 |
| 59 // views::WidgetDelegate overrides. | 60 // views::WidgetDelegate overrides. |
| 60 virtual ui::ModalType GetModalType() const OVERRIDE; | 61 virtual ui::ModalType GetModalType() const override; |
| 61 virtual bool ShouldShowWindowTitle() const OVERRIDE; | 62 virtual bool ShouldShowWindowTitle() const override; |
| 62 virtual bool ShouldShowWindowIcon() const OVERRIDE; | 63 virtual bool ShouldShowWindowIcon() const override; |
| 63 | 64 |
| 64 // views::LinkListener override. | 65 // views::LinkListener override. |
| 65 virtual void StyledLabelLinkClicked(const gfx::Range& range, | 66 virtual void StyledLabelLinkClicked(const gfx::Range& range, |
| 66 int event_flags) OVERRIDE; | 67 int event_flags) override; |
| 67 | 68 |
| 68 // views::View override. | 69 // views::View override. |
| 69 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 70 virtual gfx::Size GetPreferredSize() const override; |
| 70 | 71 |
| 71 // Sets the border and bounds for the styled label containing the dialog | 72 // Sets the border and bounds for the styled label containing the dialog |
| 72 // text. | 73 // text. |
| 73 void SetLabelBorderAndBounds(); | 74 void SetLabelBorderAndBounds(); |
| 74 | 75 |
| 75 views::StyledLabel* label_; | 76 views::StyledLabel* label_; |
| 76 EchoDialogListener* listener_; | 77 EchoDialogListener* listener_; |
| 77 int ok_button_label_id_; | 78 int ok_button_label_id_; |
| 78 int cancel_button_label_id_; | 79 int cancel_button_label_id_; |
| 79 | 80 |
| 80 DISALLOW_COPY_AND_ASSIGN(EchoDialogView); | 81 DISALLOW_COPY_AND_ASSIGN(EchoDialogView); |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 } // namespace chromeos | 84 } // namespace chromeos |
| 84 | 85 |
| 85 #endif // CHROME_BROWSER_CHROMEOS_UI_ECHO_DIALOG_VIEW_H_ | 86 #endif // CHROME_BROWSER_CHROMEOS_UI_ECHO_DIALOG_VIEW_H_ |
| OLD | NEW |