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/accessibility/accessibility_extension_api.h" | 5 #include "chrome/browser/accessibility/accessibility_extension_api.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/accessibility/accessibility_extension_api_constants.h" | 10 #include "chrome/browser/accessibility/accessibility_extension_api_constants.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 274 |
275 ListValue* alerts_value = new ListValue; | 275 ListValue* alerts_value = new ListValue; |
276 | 276 |
277 InfoBarService* infobar_service = InfoBarService::FromWebContents(contents); | 277 InfoBarService* infobar_service = InfoBarService::FromWebContents(contents); |
278 for (size_t i = 0; i < infobar_service->infobar_count(); ++i) { | 278 for (size_t i = 0; i < infobar_service->infobar_count(); ++i) { |
279 // TODO(hashimoto): Make other kind of alerts available. crosbug.com/24281 | 279 // TODO(hashimoto): Make other kind of alerts available. crosbug.com/24281 |
280 ConfirmInfoBarDelegate* confirm_infobar_delegate = | 280 ConfirmInfoBarDelegate* confirm_infobar_delegate = |
281 infobar_service->infobar_at(i)->AsConfirmInfoBarDelegate(); | 281 infobar_service->infobar_at(i)->AsConfirmInfoBarDelegate(); |
282 if (confirm_infobar_delegate) { | 282 if (confirm_infobar_delegate) { |
283 DictionaryValue* alert_value = new DictionaryValue; | 283 DictionaryValue* alert_value = new DictionaryValue; |
284 const string16 message_text = confirm_infobar_delegate->GetMessageText(); | 284 const base::string16 message_text = |
| 285 confirm_infobar_delegate->GetMessageText(); |
285 alert_value->SetString(keys::kMessageKey, message_text); | 286 alert_value->SetString(keys::kMessageKey, message_text); |
286 alerts_value->Append(alert_value); | 287 alerts_value->Append(alert_value); |
287 } | 288 } |
288 } | 289 } |
289 | 290 |
290 SetResult(alerts_value); | 291 SetResult(alerts_value); |
291 return true; | 292 return true; |
292 } | 293 } |
OLD | NEW |