| 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/chromeos/profiles/multiprofiles_intro_dialog.h" | 5 #include "chrome/browser/chromeos/profiles/multiprofiles_intro_dialog.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/browser_dialogs.h" |
| 9 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
| 10 #include "ui/base/l10n/l10n_util.h" | 11 #include "ui/base/l10n/l10n_util.h" |
| 11 #include "ui/base/resource/resource_bundle.h" | 12 #include "ui/base/resource/resource_bundle.h" |
| 12 #include "ui/views/border.h" | 13 #include "ui/views/border.h" |
| 13 #include "ui/views/controls/button/checkbox.h" | 14 #include "ui/views/controls/button/checkbox.h" |
| 14 #include "ui/views/controls/label.h" | 15 #include "ui/views/controls/label.h" |
| 15 #include "ui/views/layout/fill_layout.h" | 16 #include "ui/views/layout/fill_layout.h" |
| 16 #include "ui/views/layout/layout_constants.h" | 17 #include "ui/views/layout/layout_constants.h" |
| 17 #include "ui/views/widget/widget.h" | 18 #include "ui/views/widget/widget.h" |
| 18 #include "ui/views/window/dialog_delegate.h" | 19 #include "ui/views/window/dialog_delegate.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 53 |
| 53 DISALLOW_COPY_AND_ASSIGN(MultiprofilesIntroView); | 54 DISALLOW_COPY_AND_ASSIGN(MultiprofilesIntroView); |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 //////////////////////////////////////////////////////////////////////////////// | 57 //////////////////////////////////////////////////////////////////////////////// |
| 57 // MultiprofilesIntroDialog implementation. | 58 // MultiprofilesIntroDialog implementation. |
| 58 | 59 |
| 59 MultiprofilesIntroView::MultiprofilesIntroView( | 60 MultiprofilesIntroView::MultiprofilesIntroView( |
| 60 const base::Callback<void(bool)> on_accept) | 61 const base::Callback<void(bool)> on_accept) |
| 61 : on_accept_(on_accept) { | 62 : on_accept_(on_accept) { |
| 63 chrome::RecordDialogCreation(chrome::DialogIdentifier::MULTIPROFILES_INTRO); |
| 62 } | 64 } |
| 63 | 65 |
| 64 MultiprofilesIntroView::~MultiprofilesIntroView() { | 66 MultiprofilesIntroView::~MultiprofilesIntroView() { |
| 65 } | 67 } |
| 66 | 68 |
| 67 // static | 69 // static |
| 68 void MultiprofilesIntroView::ShowDialog( | 70 void MultiprofilesIntroView::ShowDialog( |
| 69 const base::Callback<void(bool)> on_accept) { | 71 const base::Callback<void(bool)> on_accept) { |
| 70 MultiprofilesIntroView* dialog_view = | 72 MultiprofilesIntroView* dialog_view = |
| 71 new MultiprofilesIntroView(on_accept); | 73 new MultiprofilesIntroView(on_accept); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 } // namespace | 122 } // namespace |
| 121 | 123 |
| 122 //////////////////////////////////////////////////////////////////////////////// | 124 //////////////////////////////////////////////////////////////////////////////// |
| 123 // Factory function. | 125 // Factory function. |
| 124 | 126 |
| 125 void ShowMultiprofilesIntroDialog(const base::Callback<void(bool)> on_accept) { | 127 void ShowMultiprofilesIntroDialog(const base::Callback<void(bool)> on_accept) { |
| 126 MultiprofilesIntroView::ShowDialog(on_accept); | 128 MultiprofilesIntroView::ShowDialog(on_accept); |
| 127 } | 129 } |
| 128 | 130 |
| 129 } // namespace chromeos | 131 } // namespace chromeos |
| OLD | NEW |