| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/mobile_setup_dialog.h" | 5 #include "chrome/browser/ui/webui/chromeos/mobile_setup_dialog.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/chromeos/mobile/mobile_activator.h" | 10 #include "chrome/browser/chromeos/mobile/mobile_activator.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 dialog_window_ = NULL; | 136 dialog_window_ = NULL; |
| 137 } | 137 } |
| 138 | 138 |
| 139 void MobileSetupDialogDelegate::OnCloseContents(WebContents* source, | 139 void MobileSetupDialogDelegate::OnCloseContents(WebContents* source, |
| 140 bool* out_close_dialog) { | 140 bool* out_close_dialog) { |
| 141 if (!dialog_window_ || !MobileActivator::GetInstance()->RunningActivation()) { | 141 if (!dialog_window_ || !MobileActivator::GetInstance()->RunningActivation()) { |
| 142 *out_close_dialog = true; | 142 *out_close_dialog = true; |
| 143 return; | 143 return; |
| 144 } | 144 } |
| 145 | 145 |
| 146 *out_close_dialog = browser::ShowMessageBox(dialog_window_, | 146 *out_close_dialog = chrome::ShowMessageBox(dialog_window_, |
| 147 l10n_util::GetStringUTF16(IDS_MOBILE_SETUP_TITLE), | 147 l10n_util::GetStringUTF16(IDS_MOBILE_SETUP_TITLE), |
| 148 l10n_util::GetStringUTF16(IDS_MOBILE_CANCEL_ACTIVATION), | 148 l10n_util::GetStringUTF16(IDS_MOBILE_CANCEL_ACTIVATION), |
| 149 browser::MESSAGE_BOX_TYPE_QUESTION); | 149 chrome::MESSAGE_BOX_TYPE_QUESTION); |
| 150 } | 150 } |
| 151 | 151 |
| 152 bool MobileSetupDialogDelegate::ShouldShowDialogTitle() const { | 152 bool MobileSetupDialogDelegate::ShouldShowDialogTitle() const { |
| 153 return true; | 153 return true; |
| 154 } | 154 } |
| 155 | 155 |
| 156 bool MobileSetupDialogDelegate::HandleContextMenu( | 156 bool MobileSetupDialogDelegate::HandleContextMenu( |
| 157 const content::ContextMenuParams& params) { | 157 const content::ContextMenuParams& params) { |
| 158 return true; | 158 return true; |
| 159 } | 159 } |
| 160 | 160 |
| 161 void MobileSetupDialogDelegate::OnActivationStateChanged( | 161 void MobileSetupDialogDelegate::OnActivationStateChanged( |
| 162 CellularNetwork* network, | 162 CellularNetwork* network, |
| 163 MobileActivator::PlanActivationState state, | 163 MobileActivator::PlanActivationState state, |
| 164 const std::string& error_description) { | 164 const std::string& error_description) { |
| 165 } | 165 } |
| OLD | NEW |