| 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/controller_pairing_screen_handl
er.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/controller_pairing_screen_handl
er.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "chrome/browser/chromeos/login/oobe_screen.h" | 9 #include "chrome/browser/chromeos/login/oobe_screen.h" |
| 10 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 const char kCallbackUserActed[] = "userActed"; | 23 const char kCallbackUserActed[] = "userActed"; |
| 24 const char kCallbackContextChanged[] = "contextChanged"; | 24 const char kCallbackContextChanged[] = "contextChanged"; |
| 25 | 25 |
| 26 bool IsBootstrappingMaster() { | 26 bool IsBootstrappingMaster() { |
| 27 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 27 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 28 chromeos::switches::kOobeBootstrappingMaster); | 28 chromeos::switches::kOobeBootstrappingMaster); |
| 29 } | 29 } |
| 30 | 30 |
| 31 } // namespace | 31 } // namespace |
| 32 | 32 |
| 33 ControllerPairingScreenHandler::ControllerPairingScreenHandler() | 33 ControllerPairingScreenHandler::ControllerPairingScreenHandler() { |
| 34 : BaseScreenHandler(kJsScreenPath), delegate_(NULL), show_on_init_(false) { | 34 set_call_js_prefix(kJsScreenPath); |
| 35 } | 35 } |
| 36 | 36 |
| 37 ControllerPairingScreenHandler::~ControllerPairingScreenHandler() { | 37 ControllerPairingScreenHandler::~ControllerPairingScreenHandler() { |
| 38 if (delegate_) | 38 if (delegate_) |
| 39 delegate_->OnActorDestroyed(this); | 39 delegate_->OnActorDestroyed(this); |
| 40 } | 40 } |
| 41 | 41 |
| 42 void ControllerPairingScreenHandler::HandleUserActed( | 42 void ControllerPairingScreenHandler::HandleUserActed( |
| 43 const std::string& action) { | 43 const std::string& action) { |
| 44 if (!delegate_) | 44 if (!delegate_) |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 void ControllerPairingScreenHandler::OnContextChanged( | 165 void ControllerPairingScreenHandler::OnContextChanged( |
| 166 const base::DictionaryValue& diff) { | 166 const base::DictionaryValue& diff) { |
| 167 CallJS(kMethodContextChanged, diff); | 167 CallJS(kMethodContextChanged, diff); |
| 168 } | 168 } |
| 169 | 169 |
| 170 content::BrowserContext* ControllerPairingScreenHandler::GetBrowserContext() { | 170 content::BrowserContext* ControllerPairingScreenHandler::GetBrowserContext() { |
| 171 return web_ui()->GetWebContents()->GetBrowserContext(); | 171 return web_ui()->GetWebContents()->GetBrowserContext(); |
| 172 } | 172 } |
| 173 | 173 |
| 174 } // namespace chromeos | 174 } // namespace chromeos |
| OLD | NEW |