| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chrome/browser/ui/ash/multi_user/multi_user_warning_dialog.h" | 5 #include "chrome/browser/ui/ash/multi_user/multi_user_warning_dialog.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "chrome/grit/generated_resources.h" | 8 #include "chrome/grit/generated_resources.h" |
| 9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
| 10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 //////////////////////////////////////////////////////////////////////////////// | 30 //////////////////////////////////////////////////////////////////////////////// |
| 31 // Dialog for multi-profiles teleport warning. | 31 // Dialog for multi-profiles teleport warning. |
| 32 class TeleportWarningView : public views::DialogDelegateView { | 32 class TeleportWarningView : public views::DialogDelegateView { |
| 33 public: | 33 public: |
| 34 explicit TeleportWarningView(const base::Callback<void(bool)>& on_accept); | 34 explicit TeleportWarningView(const base::Callback<void(bool)>& on_accept); |
| 35 virtual ~TeleportWarningView(); | 35 virtual ~TeleportWarningView(); |
| 36 | 36 |
| 37 static void ShowDialog(const base::Callback<void(bool)>& on_accept); | 37 static void ShowDialog(const base::Callback<void(bool)>& on_accept); |
| 38 | 38 |
| 39 // views::DialogDelegate overrides. | 39 // views::DialogDelegate overrides. |
| 40 virtual bool Accept() OVERRIDE; | 40 virtual bool Accept() override; |
| 41 | 41 |
| 42 // views::WidgetDelegate overrides. | 42 // views::WidgetDelegate overrides. |
| 43 virtual ui::ModalType GetModalType() const OVERRIDE; | 43 virtual ui::ModalType GetModalType() const override; |
| 44 | 44 |
| 45 // views::View overrides. | 45 // views::View overrides. |
| 46 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 46 virtual gfx::Size GetPreferredSize() const override; |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 void InitDialog(); | 49 void InitDialog(); |
| 50 | 50 |
| 51 scoped_ptr<views::Checkbox> no_show_checkbox_; | 51 scoped_ptr<views::Checkbox> no_show_checkbox_; |
| 52 const base::Callback<void(bool)> on_accept_; | 52 const base::Callback<void(bool)> on_accept_; |
| 53 | 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(TeleportWarningView); | 54 DISALLOW_COPY_AND_ASSIGN(TeleportWarningView); |
| 55 }; | 55 }; |
| 56 | 56 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 //////////////////////////////////////////////////////////////////////////////// | 155 //////////////////////////////////////////////////////////////////////////////// |
| 156 // Factory function. | 156 // Factory function. |
| 157 | 157 |
| 158 void ShowMultiprofilesWarningDialog( | 158 void ShowMultiprofilesWarningDialog( |
| 159 const base::Callback<void(bool)>& on_accept) { | 159 const base::Callback<void(bool)>& on_accept) { |
| 160 TeleportWarningView::ShowDialog(on_accept); | 160 TeleportWarningView::ShowDialog(on_accept); |
| 161 } | 161 } |
| 162 | 162 |
| 163 } // namespace chromeos | 163 } // namespace chromeos |
| OLD | NEW |