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

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

Issue 2583593003: cros: Various fixes needed for preloading lock screen. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/ui/shared_web_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/wm_shell.h" 7 #include "ash/common/wm_shell.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/chromeos/power/power_event_observer.h" 9 #include "ash/system/chromeos/power/power_event_observer.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 // static 100 // static
101 void WebUIScreenLocker::Preload() { 101 void WebUIScreenLocker::Preload() {
102 DCHECK(ShouldShareLockScreen()); 102 DCHECK(ShouldShareLockScreen());
103 VLOG(1) << "Preloading lock screen"; 103 VLOG(1) << "Preloading lock screen";
104 104
105 SharedWebView* shared_web_view = 105 SharedWebView* shared_web_view =
106 SharedWebViewFactory::GetForProfile(ProfileHelper::GetSigninProfile()); 106 SharedWebViewFactory::GetForProfile(ProfileHelper::GetSigninProfile());
107 107
108 scoped_refptr<WebViewHandle> web_view_handle; 108 scoped_refptr<WebViewHandle> web_view_handle;
109 if (!shared_web_view->Get(GURL(kLoginURL), &web_view_handle)) { 109 if (!shared_web_view->has_web_view() &&
110 !shared_web_view->Get(GURL(kLoginURL), &web_view_handle)) {
110 web_view_handle->web_view()->LoadInitialURL(GURL(kLoginURL)); 111 web_view_handle->web_view()->LoadInitialURL(GURL(kLoginURL));
111 InitializeWebView( 112 InitializeWebView(
112 web_view_handle->web_view(), 113 web_view_handle->web_view(),
113 l10n_util::GetStringUTF16(IDS_LOCK_SCREEN_TASK_MANAGER_NAME)); 114 l10n_util::GetStringUTF16(IDS_LOCK_SCREEN_TASK_MANAGER_NAME));
114 } 115 }
115 } 116 }
116 117
117 //////////////////////////////////////////////////////////////////////////////// 118 ////////////////////////////////////////////////////////////////////////////////
118 // WebUIScreenLocker implementation. 119 // WebUIScreenLocker implementation.
119 120
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 } 451 }
451 452
452 if (GetOobeUI()) { 453 if (GetOobeUI()) {
453 const gfx::Size& size = primary_display.size(); 454 const gfx::Size& size = primary_display.size();
454 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(), 455 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(),
455 size.height()); 456 size.height());
456 } 457 }
457 } 458 }
458 459
459 } // namespace chromeos 460 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/ui/shared_web_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698