| 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/extensions/api/processes/processes_api.h" | 5 #include "chrome/browser/extensions/api/processes/processes_api.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| 11 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
| 12 #include "base/metrics/histogram_macros.h" | 12 #include "base/metrics/histogram_macros.h" |
| 13 #include "base/process/process.h" | 13 #include "base/process/process.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
| 16 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" | 16 #include "chrome/browser/extensions/api/tabs/tabs_constants.h" |
| 17 #include "chrome/browser/extensions/extension_tab_util.h" | 17 #include "chrome/browser/extensions/extension_tab_util.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/task_manager/task_manager_interface.h" | 19 #include "chrome/browser/task_manager/task_manager_interface.h" |
| 20 #include "chrome/common/extensions/api/processes.h" | 20 #include "chrome/common/extensions/api/processes.h" |
| 21 #include "content/public/browser/browser_child_process_host.h" | 21 #include "content/public/browser/browser_child_process_host.h" |
| 22 #include "content/public/browser/child_process_data.h" | 22 #include "content/public/browser/child_process_data.h" |
| 23 #include "content/public/browser/render_process_host.h" | 23 #include "content/public/browser/render_process_host.h" |
| 24 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
| 25 #include "content/public/common/child_process_host.h" | 25 #include "content/public/common/child_process_host.h" |
| 26 #include "content/public/common/result_codes.h" | 26 #include "content/public/common/result_codes.h" |
| 27 #include "extensions/common/error_utils.h" | 27 #include "extensions/common/error_utils.h" |
| 28 #include "third_party/WebKit/public/web/WebCache.h" | 28 #include "third_party/WebKit/public/platform/WebCache.h" |
| 29 | 29 |
| 30 namespace extensions { | 30 namespace extensions { |
| 31 | 31 |
| 32 namespace errors { | 32 namespace errors { |
| 33 const char kNotAllowedToTerminate[] = "Not allowed to terminate process: *."; | 33 const char kNotAllowedToTerminate[] = "Not allowed to terminate process: *."; |
| 34 const char kProcessNotFound[] = "Process not found: *."; | 34 const char kProcessNotFound[] = "Process not found: *."; |
| 35 const char kInvalidArgument[] = "Invalid argument: *."; | 35 const char kInvalidArgument[] = "Invalid argument: *."; |
| 36 } // namespace errors | 36 } // namespace errors |
| 37 | 37 |
| 38 namespace { | 38 namespace { |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 // Send the response. | 680 // Send the response. |
| 681 Respond(ArgumentList( | 681 Respond(ArgumentList( |
| 682 api::processes::GetProcessInfo::Results::Create(processes))); | 682 api::processes::GetProcessInfo::Results::Create(processes))); |
| 683 | 683 |
| 684 // Stop observing the task manager, and balance the AddRef() in Run(). | 684 // Stop observing the task manager, and balance the AddRef() in Run(). |
| 685 task_manager::TaskManagerInterface::GetTaskManager()->RemoveObserver(this); | 685 task_manager::TaskManagerInterface::GetTaskManager()->RemoveObserver(this); |
| 686 Release(); | 686 Release(); |
| 687 } | 687 } |
| 688 | 688 |
| 689 } // namespace extensions | 689 } // namespace extensions |
| OLD | NEW |