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_session_aborted_dialog.
h" | 5 #include "chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.
h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/lifetime/application_lifetime.h" | 9 #include "chrome/browser/lifetime/application_lifetime.h" |
10 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 //////////////////////////////////////////////////////////////////////////////// | 31 //////////////////////////////////////////////////////////////////////////////// |
32 // Dialog for an aborted multi-profile session due to a user policy change . | 32 // Dialog for an aborted multi-profile session due to a user policy change . |
33 class MultiprofilesSessionAbortedView : public views::DialogDelegateView { | 33 class MultiprofilesSessionAbortedView : public views::DialogDelegateView { |
34 public: | 34 public: |
35 explicit MultiprofilesSessionAbortedView(); | 35 explicit MultiprofilesSessionAbortedView(); |
36 virtual ~MultiprofilesSessionAbortedView(); | 36 virtual ~MultiprofilesSessionAbortedView(); |
37 | 37 |
38 static void ShowDialog(const std::string& user_email); | 38 static void ShowDialog(const std::string& user_email); |
39 | 39 |
40 // views::DialogDelegate overrides. | 40 // views::DialogDelegate overrides. |
41 virtual bool Accept() OVERRIDE; | 41 virtual bool Accept() override; |
42 virtual int GetDialogButtons() const OVERRIDE; | 42 virtual int GetDialogButtons() const override; |
43 virtual base::string16 GetDialogButtonLabel( | 43 virtual base::string16 GetDialogButtonLabel( |
44 ui::DialogButton button) const OVERRIDE; | 44 ui::DialogButton button) const override; |
45 | 45 |
46 // views::WidgetDelegate overrides. | 46 // views::WidgetDelegate overrides. |
47 virtual ui::ModalType GetModalType() const OVERRIDE; | 47 virtual ui::ModalType GetModalType() const override; |
48 | 48 |
49 // views::View overrides. | 49 // views::View overrides. |
50 virtual gfx::Size GetPreferredSize() const OVERRIDE; | 50 virtual gfx::Size GetPreferredSize() const override; |
51 | 51 |
52 private: | 52 private: |
53 void InitDialog(const std::string& user_email); | 53 void InitDialog(const std::string& user_email); |
54 | 54 |
55 DISALLOW_COPY_AND_ASSIGN(MultiprofilesSessionAbortedView); | 55 DISALLOW_COPY_AND_ASSIGN(MultiprofilesSessionAbortedView); |
56 }; | 56 }; |
57 | 57 |
58 //////////////////////////////////////////////////////////////////////////////// | 58 //////////////////////////////////////////////////////////////////////////////// |
59 // MultiprofilesSessionAbortedView implementation. | 59 // MultiprofilesSessionAbortedView implementation. |
60 | 60 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 } // namespace | 149 } // namespace |
150 | 150 |
151 //////////////////////////////////////////////////////////////////////////////// | 151 //////////////////////////////////////////////////////////////////////////////// |
152 // Factory function. | 152 // Factory function. |
153 | 153 |
154 void ShowMultiprofilesSessionAbortedDialog(const std::string& user_email) { | 154 void ShowMultiprofilesSessionAbortedDialog(const std::string& user_email) { |
155 MultiprofilesSessionAbortedView::ShowDialog(user_email); | 155 MultiprofilesSessionAbortedView::ShowDialog(user_email); |
156 } | 156 } |
157 | 157 |
158 } // namespace chromeos | 158 } // namespace chromeos |
OLD | NEW |