OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/idle_logout_dialog_view.h" | 5 #include "chrome/browser/chromeos/ui/idle_logout_dialog_view.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 //////////////////////////////////////////////////////////////////////////////// | 82 //////////////////////////////////////////////////////////////////////////////// |
83 // Overridden from views::DialogDelegateView | 83 // Overridden from views::DialogDelegateView |
84 int IdleLogoutDialogView::GetDialogButtons() const { | 84 int IdleLogoutDialogView::GetDialogButtons() const { |
85 return ui::DIALOG_BUTTON_NONE; | 85 return ui::DIALOG_BUTTON_NONE; |
86 } | 86 } |
87 | 87 |
88 ui::ModalType IdleLogoutDialogView::GetModalType() const { | 88 ui::ModalType IdleLogoutDialogView::GetModalType() const { |
89 return ui::MODAL_TYPE_WINDOW; | 89 return ui::MODAL_TYPE_WINDOW; |
90 } | 90 } |
91 | 91 |
92 string16 IdleLogoutDialogView::GetWindowTitle() const { | 92 base::string16 IdleLogoutDialogView::GetWindowTitle() const { |
93 return l10n_util::GetStringUTF16(IDS_IDLE_LOGOUT_TITLE); | 93 return l10n_util::GetStringUTF16(IDS_IDLE_LOGOUT_TITLE); |
94 } | 94 } |
95 | 95 |
96 bool IdleLogoutDialogView::Close() { | 96 bool IdleLogoutDialogView::Close() { |
97 if (timer_.IsRunning()) | 97 if (timer_.IsRunning()) |
98 timer_.Stop(); | 98 timer_.Stop(); |
99 | 99 |
100 // We just closed our dialog. The global | 100 // We just closed our dialog. The global |
101 // instance is invalid now, set it to null. | 101 // instance is invalid now, set it to null. |
102 g_instance = NULL; | 102 g_instance = NULL; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 return g_instance; | 201 return g_instance; |
202 } | 202 } |
203 | 203 |
204 // static | 204 // static |
205 void IdleLogoutDialogView::set_settings_provider( | 205 void IdleLogoutDialogView::set_settings_provider( |
206 IdleLogoutSettingsProvider* provider) { | 206 IdleLogoutSettingsProvider* provider) { |
207 provider_ = provider; | 207 provider_ = provider; |
208 } | 208 } |
209 | 209 |
210 } // namespace chromeos | 210 } // namespace chromeos |
OLD | NEW |