| 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/extensions/api/automation_internal/automation_internal_
api.h" | 5 #include "chrome/browser/extensions/api/automation_internal/automation_internal_
api.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ptr_util.h" |
| 12 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 13 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 14 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 15 #include "chrome/browser/extensions/api/automation_internal/automation_action_ad
apter.h" | 16 #include "chrome/browser/extensions/api/automation_internal/automation_action_ad
apter.h" |
| 16 #include "chrome/browser/extensions/api/automation_internal/automation_event_rou
ter.h" | 17 #include "chrome/browser/extensions/api/automation_internal/automation_event_rou
ter.h" |
| 17 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" | 18 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" |
| 18 #include "chrome/browser/extensions/extension_tab_util.h" | 19 #include "chrome/browser/extensions/extension_tab_util.h" |
| 19 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
| 20 #include "chrome/browser/ui/browser.h" | 21 #include "chrome/browser/ui/browser.h" |
| 21 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 22 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 } | 442 } |
| 442 | 443 |
| 443 void AutomationInternalQuerySelectorFunction::OnResponse( | 444 void AutomationInternalQuerySelectorFunction::OnResponse( |
| 444 const std::string& error, | 445 const std::string& error, |
| 445 int result_acc_obj_id) { | 446 int result_acc_obj_id) { |
| 446 if (!error.empty()) { | 447 if (!error.empty()) { |
| 447 Respond(Error(error)); | 448 Respond(Error(error)); |
| 448 return; | 449 return; |
| 449 } | 450 } |
| 450 | 451 |
| 451 Respond(OneArgument(new base::FundamentalValue(result_acc_obj_id))); | 452 Respond( |
| 453 OneArgument(base::MakeUnique<base::FundamentalValue>(result_acc_obj_id))); |
| 452 } | 454 } |
| 453 | 455 |
| 454 } // namespace extensions | 456 } // namespace extensions |
| OLD | NEW |