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

Unified Diff: chrome/browser/chromeos/login/lock/webui_screen_locker.h

Issue 2610373002: cros: Only preload the lock screen; do not reuse it. (Closed)
Patch Set: Initial upload Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/lock/webui_screen_locker.h
diff --git a/chrome/browser/chromeos/login/lock/webui_screen_locker.h b/chrome/browser/chromeos/login/lock/webui_screen_locker.h
index 2a49acd28292e8d7f4a0a1ae8c30ea6048774dc1..91fe5349499b6b582220acd59d132f7571928c0c 100644
--- a/chrome/browser/chromeos/login/lock/webui_screen_locker.h
+++ b/chrome/browser/chromeos/login/lock/webui_screen_locker.h
@@ -55,9 +55,9 @@ class WebUIScreenLocker : public WebUILoginView,
public display::DisplayObserver,
public content::WebContentsObserver {
public:
- // Returns true if the lock screen should be shared.
- static bool ShouldShareLockScreen();
- static void Preload();
+ // Request lock screen preload when the user is idle. Does nothing if
+ // preloading is disabled or if the preload hueristics return false.
+ static void RequestPreload();
explicit WebUIScreenLocker(ScreenLocker* screen_locker);
~WebUIScreenLocker() override;
@@ -93,6 +93,11 @@ class WebUIScreenLocker : public WebUILoginView,
void OnHeaderBarVisible();
private:
+ // Returns true if the lock screen should be preloaded.
+ static bool ShouldPreloadLockScreen();
+ // Helper function that creates and preloads a views::WebView.
+ static std::unique_ptr<views::WebView> DoPreload(Profile* profile);
xiyuan 2017/01/06 17:14:25 nit: move this after "friend" to match existing co
jdufault 2017/01/13 19:46:58 Done.
+
friend class test::WebUIScreenLockerTester;
// LoginDisplay::Delegate:
@@ -158,6 +163,9 @@ class WebUIScreenLocker : public WebUILoginView,
// Reset user pod and ensures that user pod is focused.
void ResetAndFocusUserPod();
+ // Configuration settings.
+ WebViewSettings BuildConfigSettings();
+
// The ScreenLocker that owns this instance.
ScreenLocker* screen_locker_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698