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

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

Issue 2638123002: cros: Fold HIDDetectionModel into HIDDetectionScreen. (Closed)
Patch Set: Nit 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
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 954a69e2982e6d2e3c6321ba6d8eae57bd979fc0..66faf84d767fb37096ffc40951042bd98e637261 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
@@ -12,7 +12,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/login/oobe_screen.h"
#include "chrome/browser/chromeos/login/screens/core_oobe_actor.h"
-#include "chrome/browser/chromeos/login/screens/hid_detection_model.h"
+#include "chrome/browser/chromeos/login/screens/hid_detection_screen.h"
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
@@ -30,15 +30,11 @@ namespace chromeos {
HIDDetectionScreenHandler::HIDDetectionScreenHandler(
CoreOobeActor* core_oobe_actor)
- : BaseScreenHandler(kJsScreenPath),
- model_(NULL),
- core_oobe_actor_(core_oobe_actor),
- show_on_init_(false) {
-}
+ : BaseScreenHandler(kJsScreenPath), core_oobe_actor_(core_oobe_actor) {}
HIDDetectionScreenHandler::~HIDDetectionScreenHandler() {
- if (model_)
- model_->OnViewDestroyed(this);
+ if (screen_)
+ screen_->OnViewDestroyed(this);
}
void HIDDetectionScreenHandler::Show() {
@@ -60,21 +56,21 @@ void HIDDetectionScreenHandler::Show() {
void HIDDetectionScreenHandler::Hide() {
}
-void HIDDetectionScreenHandler::Bind(HIDDetectionModel& model) {
- model_ = &model;
- BaseScreenHandler::SetBaseScreen(model_);
+void HIDDetectionScreenHandler::Bind(HIDDetectionScreen* screen) {
+ screen_ = screen;
+ BaseScreenHandler::SetBaseScreen(screen_);
if (page_is_ready())
Initialize();
}
void HIDDetectionScreenHandler::Unbind() {
- model_ = nullptr;
+ screen_ = nullptr;
BaseScreenHandler::SetBaseScreen(nullptr);
}
void HIDDetectionScreenHandler::CheckIsScreenRequired(
const base::Callback<void(bool)>& on_check_done) {
- model_->CheckIsScreenRequired(on_check_done);
+ screen_->CheckIsScreenRequired(on_check_done);
}
void HIDDetectionScreenHandler::DeclareLocalizedValues(
@@ -112,8 +108,8 @@ void HIDDetectionScreenHandler::Initialize() {
void HIDDetectionScreenHandler::HandleOnContinue() {
// Continue button pressed.
core_oobe_actor_->StopDemoModeDetection();
- if (model_)
- model_->OnContinueButtonClicked();
+ if (screen_)
+ screen_->OnContinueButtonClicked();
}
// static
« no previous file with comments | « chrome/browser/ui/webui/chromeos/login/hid_detection_screen_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698