Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / login / webui_screen_locker.cc
index dad714e..b653e3f 100644 (file)
@@ -28,7 +28,7 @@
 #include "content/public/browser/render_widget_host_view.h"
 #include "content/public/browser/web_ui.h"
 #include "ui/aura/client/capture_client.h"
-#include "ui/aura/root_window.h"
+#include "ui/aura/window_event_dispatcher.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/x/x11_util.h"
 #include "ui/gfx/screen.h"
@@ -113,6 +113,28 @@ void WebUIScreenLocker::ShowUserPodButton(
   login_display_->ShowUserPodButton(username, iconURL, click_callback);
 }
 
+void WebUIScreenLocker::HideUserPodButton(const std::string& username) {
+  if (!webui_ready_)
+    return;
+  login_display_->HideUserPodButton(username);
+}
+
+void WebUIScreenLocker::SetAuthType(const std::string& username,
+                                    LoginDisplay::AuthType auth_type,
+                                    const std::string& initial_value) {
+  if (!webui_ready_)
+    return;
+  login_display_->SetAuthType(username, auth_type, initial_value);
+}
+
+LoginDisplay::AuthType WebUIScreenLocker::GetAuthType(
+    const std::string& username) const {
+  // Return default auth type if login display is not ready.
+  if (!webui_ready_)
+    return LoginDisplay::OFFLINE_PASSWORD;
+  return login_display_->GetAuthType(username);
+}
+
 void WebUIScreenLocker::ShowErrorMessage(
     int error_msg_id,
     HelpAppLauncher::HelpTopic help_topic_id) {
@@ -251,10 +273,6 @@ void WebUIScreenLocker::OnStartKioskEnableScreen() {
   NOTREACHED();
 }
 
-void WebUIScreenLocker::OnStartDeviceReset() {
-  NOTREACHED();
-}
-
 void WebUIScreenLocker::OnStartKioskAutolaunchScreen() {
   NOTREACHED();
 }
@@ -278,7 +296,8 @@ void WebUIScreenLocker::Signout() {
   chromeos::ScreenLocker::default_screen_locker()->Signout();
 }
 
-void WebUIScreenLocker::LoginAsKioskApp(const std::string& app_id) {
+void WebUIScreenLocker::LoginAsKioskApp(const std::string& app_id,
+                                        bool diagnostic_mode) {
   NOTREACHED();
 }
 
@@ -324,7 +343,7 @@ void WebUIScreenLocker::LidEventReceived(bool open,
       base::Bind(&WebUIScreenLocker::FocusUserPod, weak_factory_.GetWeakPtr()));
 }
 
-void WebUIScreenLocker::SystemResumed(const base::TimeDelta& sleep_duration) {
+void WebUIScreenLocker::SuspendDone(const base::TimeDelta& sleep_duration) {
   content::BrowserThread::PostTask(
       content::BrowserThread::UI,
       FROM_HERE,