Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: chrome/browser/chromeos/ui/idle_logout_dialog_view.cc

Issue 10919083: Revert 131706 - Make idle logout window not cause the app list to disappear. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
8 #include "base/bind.h" 7 #include "base/bind.h"
9 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
10 #include "base/time.h" 9 #include "base/time.h"
11 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
12 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
13 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 12 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
14 #include "chrome/browser/ui/browser_list.h" 13 #include "chrome/browser/ui/browser_list.h"
15 #include "chromeos/dbus/dbus_thread_manager.h" 14 #include "chromeos/dbus/dbus_thread_manager.h"
16 #include "chromeos/dbus/session_manager_client.h" 15 #include "chromeos/dbus/session_manager_client.h"
17 #include "grit/browser_resources.h" 16 #include "grit/browser_resources.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 void IdleLogoutDialogView::Show() { 144 void IdleLogoutDialogView::Show() {
146 KioskModeSettings* settings = 145 KioskModeSettings* settings =
147 IdleLogoutDialogView::provider_->GetKioskModeSettings(); 146 IdleLogoutDialogView::provider_->GetKioskModeSettings();
148 147
149 // Setup the countdown label before showing. 148 // Setup the countdown label before showing.
150 countdown_end_time_ = base::Time::Now() + 149 countdown_end_time_ = base::Time::Now() +
151 settings->GetIdleLogoutWarningDuration(); 150 settings->GetIdleLogoutWarningDuration();
152 151
153 UpdateCountdown(); 152 UpdateCountdown();
154 153
155 // If the apps list is displayed, we should show as it's child. Not doing 154 views::Widget::CreateWindow(this);
156 // so will cause the apps list to disappear. 155 GetWidget()->SetAlwaysOnTop(true);
157 gfx::NativeWindow app_list = ash::Shell::GetInstance()->GetAppListWindow();
158 if (app_list) {
159 views::Widget::CreateWindowWithParent(this, app_list);
160 } else {
161 views::Widget::CreateWindow(this);
162 GetWidget()->SetAlwaysOnTop(true);
163 }
164 GetWidget()->Show(); 156 GetWidget()->Show();
165 157
166 // Update countdown every 1 second. 158 // Update countdown every 1 second.
167 timer_.Start(FROM_HERE, 159 timer_.Start(FROM_HERE,
168 IdleLogoutDialogView::provider_->GetCountdownUpdateInterval(), 160 IdleLogoutDialogView::provider_->GetCountdownUpdateInterval(),
169 this, 161 this,
170 &IdleLogoutDialogView::UpdateCountdown); 162 &IdleLogoutDialogView::UpdateCountdown);
171 } 163 }
172 164
173 void IdleLogoutDialogView::Close() { 165 void IdleLogoutDialogView::Close() {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 return g_instance; 203 return g_instance;
212 } 204 }
213 205
214 // static 206 // static
215 void IdleLogoutDialogView::set_settings_provider( 207 void IdleLogoutDialogView::set_settings_provider(
216 IdleLogoutSettingsProvider* provider) { 208 IdleLogoutSettingsProvider* provider) {
217 provider_ = provider; 209 provider_ = provider;
218 } 210 }
219 211
220 } // namespace chromeos 212 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698