| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/kiosk_enable_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/kiosk_enable_screen_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 } // namespace | 23 } // namespace |
| 24 | 24 |
| 25 namespace chromeos { | 25 namespace chromeos { |
| 26 | 26 |
| 27 KioskEnableScreenHandler::KioskEnableScreenHandler() : weak_ptr_factory_(this) { | 27 KioskEnableScreenHandler::KioskEnableScreenHandler() : weak_ptr_factory_(this) { |
| 28 set_call_js_prefix(kJsScreenPath); | 28 set_call_js_prefix(kJsScreenPath); |
| 29 } | 29 } |
| 30 | 30 |
| 31 KioskEnableScreenHandler::~KioskEnableScreenHandler() { | 31 KioskEnableScreenHandler::~KioskEnableScreenHandler() { |
| 32 if (delegate_) | 32 if (delegate_) |
| 33 delegate_->OnActorDestroyed(this); | 33 delegate_->OnViewDestroyed(this); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void KioskEnableScreenHandler::Show() { | 36 void KioskEnableScreenHandler::Show() { |
| 37 if (!page_is_ready()) { | 37 if (!page_is_ready()) { |
| 38 show_on_init_ = true; | 38 show_on_init_ = true; |
| 39 return; | 39 return; |
| 40 } | 40 } |
| 41 | 41 |
| 42 KioskAppManager::Get()->GetConsumerKioskAutoLaunchStatus( | 42 KioskAppManager::Get()->GetConsumerKioskAutoLaunchStatus( |
| 43 base::Bind( | 43 base::Bind( |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 CallJS("onCompleted", success); | 133 CallJS("onCompleted", success); |
| 134 if (success) { | 134 if (success) { |
| 135 content::NotificationService::current()->Notify( | 135 content::NotificationService::current()->Notify( |
| 136 chrome::NOTIFICATION_KIOSK_ENABLED, | 136 chrome::NOTIFICATION_KIOSK_ENABLED, |
| 137 content::NotificationService::AllSources(), | 137 content::NotificationService::AllSources(), |
| 138 content::NotificationService::NoDetails()); | 138 content::NotificationService::NoDetails()); |
| 139 } | 139 } |
| 140 } | 140 } |
| 141 | 141 |
| 142 } // namespace chromeos | 142 } // namespace chromeos |
| OLD | NEW |