| OLD | NEW |
| 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/ui/webui/chromeos/login/hid_detection_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 const char kJsScreenPath[] = "login.HIDDetectionScreen"; | 25 const char kJsScreenPath[] = "login.HIDDetectionScreen"; |
| 26 | 26 |
| 27 } // namespace | 27 } // namespace |
| 28 | 28 |
| 29 namespace chromeos { | 29 namespace chromeos { |
| 30 | 30 |
| 31 HIDDetectionScreenHandler::HIDDetectionScreenHandler( | 31 HIDDetectionScreenHandler::HIDDetectionScreenHandler( |
| 32 CoreOobeActor* core_oobe_actor) | 32 CoreOobeActor* core_oobe_actor) |
| 33 : BaseScreenHandler(kJsScreenPath), core_oobe_actor_(core_oobe_actor) {} | 33 : core_oobe_actor_(core_oobe_actor) { |
| 34 set_call_js_prefix(kJsScreenPath); |
| 35 } |
| 34 | 36 |
| 35 HIDDetectionScreenHandler::~HIDDetectionScreenHandler() { | 37 HIDDetectionScreenHandler::~HIDDetectionScreenHandler() { |
| 36 if (screen_) | 38 if (screen_) |
| 37 screen_->OnViewDestroyed(this); | 39 screen_->OnViewDestroyed(this); |
| 38 } | 40 } |
| 39 | 41 |
| 40 void HIDDetectionScreenHandler::Show() { | 42 void HIDDetectionScreenHandler::Show() { |
| 41 if (!page_is_ready()) { | 43 if (!page_is_ready()) { |
| 42 show_on_init_ = true; | 44 show_on_init_ = true; |
| 43 return; | 45 return; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 if (screen_) | 113 if (screen_) |
| 112 screen_->OnContinueButtonClicked(); | 114 screen_->OnContinueButtonClicked(); |
| 113 } | 115 } |
| 114 | 116 |
| 115 // static | 117 // static |
| 116 void HIDDetectionScreenHandler::RegisterPrefs(PrefRegistrySimple* registry) { | 118 void HIDDetectionScreenHandler::RegisterPrefs(PrefRegistrySimple* registry) { |
| 117 registry->RegisterIntegerPref(prefs::kTimesHIDDialogShown, 0); | 119 registry->RegisterIntegerPref(prefs::kTimesHIDDialogShown, 0); |
| 118 } | 120 } |
| 119 | 121 |
| 120 } // namespace chromeos | 122 } // namespace chromeos |
| OLD | NEW |