| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/extension_processes_api.h" | 5 #include "chrome/browser/extensions/extension_processes_api.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/json/json_writer.h" | 8 #include "base/json/json_writer.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 NULL, NULL, &contents, &tab_index)) { | 166 NULL, NULL, &contents, &tab_index)) { |
| 167 error_ = ExtensionErrorUtils::FormatErrorMessage( | 167 error_ = ExtensionErrorUtils::FormatErrorMessage( |
| 168 extension_tabs_module_constants::kTabNotFoundError, | 168 extension_tabs_module_constants::kTabNotFoundError, |
| 169 base::IntToString(tab_id)); | 169 base::IntToString(tab_id)); |
| 170 return false; | 170 return false; |
| 171 } | 171 } |
| 172 | 172 |
| 173 // Return the process ID of the tab as an integer. | 173 // Return the process ID of the tab as an integer. |
| 174 int id = base::GetProcId(contents->tab_contents()-> | 174 int id = base::GetProcId(contents->tab_contents()-> |
| 175 GetRenderProcessHost()->GetHandle()); | 175 GetRenderProcessHost()->GetHandle()); |
| 176 result_.reset(Value::CreateIntegerValue(id)); | 176 result_.reset(base::NumberValue::New(id)); |
| 177 return true; | 177 return true; |
| 178 } | 178 } |
| OLD | NEW |