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

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

Issue 15042008: Remove the idle logout dialog extra border. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove debugging code. Created 7 years, 7 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" 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 void IdleLogoutDialogView::Show() { 142 void IdleLogoutDialogView::Show() {
143 KioskModeSettings* settings = 143 KioskModeSettings* settings =
144 IdleLogoutDialogView::provider_->GetKioskModeSettings(); 144 IdleLogoutDialogView::provider_->GetKioskModeSettings();
145 145
146 // Setup the countdown label before showing. 146 // Setup the countdown label before showing.
147 countdown_end_time_ = base::Time::Now() + 147 countdown_end_time_ = base::Time::Now() +
148 settings->GetIdleLogoutWarningDuration(); 148 settings->GetIdleLogoutWarningDuration();
149 149
150 UpdateCountdown(); 150 UpdateCountdown();
151 151
152 views::Widget::CreateWindowWithContext(this, 152 views::DialogDelegate::CreateDialogWidget(
153 ash::Shell::GetPrimaryRootWindow()); 153 this, ash::Shell::GetPrimaryRootWindow(), NULL);
154 GetWidget()->SetAlwaysOnTop(true); 154 GetWidget()->SetAlwaysOnTop(true);
155 GetWidget()->Show(); 155 GetWidget()->Show();
156 156
157 // Update countdown every 1 second. 157 // Update countdown every 1 second.
158 timer_.Start(FROM_HERE, 158 timer_.Start(FROM_HERE,
159 IdleLogoutDialogView::provider_->GetCountdownUpdateInterval(), 159 IdleLogoutDialogView::provider_->GetCountdownUpdateInterval(),
160 this, 160 this,
161 &IdleLogoutDialogView::UpdateCountdown); 161 &IdleLogoutDialogView::UpdateCountdown);
162 } 162 }
163 163
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 return g_instance; 202 return g_instance;
203 } 203 }
204 204
205 // static 205 // static
206 void IdleLogoutDialogView::set_settings_provider( 206 void IdleLogoutDialogView::set_settings_provider(
207 IdleLogoutSettingsProvider* provider) { 207 IdleLogoutSettingsProvider* provider) {
208 provider_ = provider; 208 provider_ = provider;
209 } 209 }
210 210
211 } // namespace chromeos 211 } // 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