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

Unified Diff: chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.cc

Issue 913773002: Created fakes for HID-detection screen testing. Initial browsertest added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.cc
diff --git a/chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.cc
index 7d562da0bf4effe19da6c18742f5eebe68c252a2..f0db75daa2c40db1a0bad38f0f0f732af6d3ea99 100644
--- a/chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.cc
@@ -14,6 +14,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/chromeos/device/input_service_proxy_factory.h"
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
@@ -77,6 +78,7 @@ HIDDetectionScreenHandler::HIDDetectionScreenHandler(
delegate_(NULL),
core_oobe_actor_(core_oobe_actor),
show_on_init_(false),
+ input_service_proxy_(InputServiceProxyFactory::GetProxy()),
mouse_is_pairing_(false),
pointing_device_connect_type_(InputDeviceInfo::TYPE_UNKNOWN),
keyboard_is_pairing_(false),
@@ -89,7 +91,7 @@ HIDDetectionScreenHandler::~HIDDetectionScreenHandler() {
adapter_initially_powered_.reset();
if (adapter_.get())
adapter_->RemoveObserver(this);
- input_service_proxy_.RemoveObserver(this);
+ input_service_proxy_->RemoveObserver(this);
if (delegate_)
delegate_->OnActorDestroyed(this);
}
@@ -119,7 +121,7 @@ void HIDDetectionScreenHandler::Show() {
return;
}
core_oobe_actor_->InitDemoModeDetection();
- input_service_proxy_.AddObserver(this);
+ input_service_proxy_->AddObserver(this);
UpdateDevices();
PrefService* local_state = g_browser_process->local_state();
@@ -136,7 +138,7 @@ void HIDDetectionScreenHandler::Show() {
void HIDDetectionScreenHandler::Hide() {
if (adapter_.get())
adapter_->RemoveObserver(this);
- input_service_proxy_.RemoveObserver(this);
+ input_service_proxy_->RemoveObserver(this);
}
void HIDDetectionScreenHandler::SetDelegate(Delegate* delegate) {
@@ -147,7 +149,7 @@ void HIDDetectionScreenHandler::SetDelegate(Delegate* delegate) {
void HIDDetectionScreenHandler::CheckIsScreenRequired(
const base::Callback<void(bool)>& on_check_done) {
- input_service_proxy_.GetDevices(
+ input_service_proxy_->GetDevices(
base::Bind(&HIDDetectionScreenHandler::OnGetInputDevicesListForCheck,
weak_ptr_factory_.GetWeakPtr(),
on_check_done));
@@ -403,7 +405,7 @@ void HIDDetectionScreenHandler::RegisterPrefs(PrefRegistrySimple* registry) {
}
void HIDDetectionScreenHandler::UpdateDevices() {
- input_service_proxy_.GetDevices(
+ input_service_proxy_->GetDevices(
base::Bind(&HIDDetectionScreenHandler::OnGetInputDevicesList,
weak_ptr_factory_.GetWeakPtr()));
}

Powered by Google App Engine
This is Rietveld 408576698