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

Side by Side Diff: chrome/browser/chromeos/login/lock/webui_screen_locker.cc

Issue 910393002: Disable rendering when suspending on chrome os (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up comments Created 5 years, 10 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
OLDNEW
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/login/lock/webui_screen_locker.h" 5 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h"
6 6
7 #include "ash/shell.h"
8 #include "ash/system/chromeos/power/power_event_observer.h"
7 #include "ash/wm/lock_state_controller.h" 9 #include "ash/wm/lock_state_controller.h"
8 #include "ash/wm/lock_state_observer.h" 10 #include "ash/wm/lock_state_observer.h"
9 #include "base/command_line.h" 11 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
11 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
12 #include "base/values.h" 14 #include "base/values.h"
13 #include "chrome/browser/browser_shutdown.h" 15 #include "chrome/browser/browser_shutdown.h"
14 #include "chrome/browser/chrome_notification_types.h" 16 #include "chrome/browser/chrome_notification_types.h"
15 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 17 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
16 #include "chrome/browser/chromeos/login/helper.h" 18 #include "chrome/browser/chromeos/login/helper.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 webui_ready_ = true; 198 webui_ready_ = true;
197 if (lock_ready_) 199 if (lock_ready_)
198 ScreenLockReady(); 200 ScreenLockReady();
199 } 201 }
200 202
201 void WebUIScreenLocker::OnLockBackgroundDisplayed() { 203 void WebUIScreenLocker::OnLockBackgroundDisplayed() {
202 UMA_HISTOGRAM_TIMES("LockScreen.BackgroundReady", 204 UMA_HISTOGRAM_TIMES("LockScreen.BackgroundReady",
203 base::TimeTicks::Now() - lock_time_); 205 base::TimeTicks::Now() - lock_time_);
204 } 206 }
205 207
208 void WebUIScreenLocker::OnHeaderBarVisible() {
209 DCHECK(ash::Shell::HasInstance());
210
211 ash::Shell::GetInstance()->power_event_observer()->OnLockAnimationsComplete();
212 }
213
206 OobeUI* WebUIScreenLocker::GetOobeUI() { 214 OobeUI* WebUIScreenLocker::GetOobeUI() {
207 return static_cast<OobeUI*>(GetWebUI()->GetController()); 215 return static_cast<OobeUI*>(GetWebUI()->GetController());
208 } 216 }
209 217
210 //////////////////////////////////////////////////////////////////////////////// 218 ////////////////////////////////////////////////////////////////////////////////
211 // WebUIScreenLocker, LoginDisplay::Delegate: 219 // WebUIScreenLocker, LoginDisplay::Delegate:
212 220
213 void WebUIScreenLocker::CancelPasswordChangedFlow() { 221 void WebUIScreenLocker::CancelPasswordChangedFlow() {
214 NOTREACHED(); 222 NOTREACHED();
215 } 223 }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 } 413 }
406 414
407 if (GetOobeUI()) { 415 if (GetOobeUI()) {
408 const gfx::Size& size = primary_display.size(); 416 const gfx::Size& size = primary_display.size();
409 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(), 417 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(),
410 size.height()); 418 size.height());
411 } 419 }
412 } 420 }
413 421
414 } // namespace chromeos 422 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698