Chromium Code Reviews| 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/automation/automation_provider_observers.h" | 5 #include "chrome/browser/automation/automation_provider_observers.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 2700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2711 | 2711 |
| 2712 ProcessInfoObserver::ProcessInfoObserver( | 2712 ProcessInfoObserver::ProcessInfoObserver( |
| 2713 AutomationProvider* automation, | 2713 AutomationProvider* automation, |
| 2714 IPC::Message* reply_message) | 2714 IPC::Message* reply_message) |
| 2715 : automation_(automation->AsWeakPtr()), | 2715 : automation_(automation->AsWeakPtr()), |
| 2716 reply_message_(reply_message) {} | 2716 reply_message_(reply_message) {} |
| 2717 | 2717 |
| 2718 ProcessInfoObserver::~ProcessInfoObserver() {} | 2718 ProcessInfoObserver::~ProcessInfoObserver() {} |
| 2719 | 2719 |
| 2720 void ProcessInfoObserver::OnDetailsAvailable() { | 2720 void ProcessInfoObserver::OnDetailsAvailable() { |
| 2721 // TODO(jamescook): Remove this. I don't think we want it for automated | |
| 2722 // tests, but it's how the system has always worked. | |
|
Greg Spencer (Chromium)
2012/04/20 00:28:21
Can you elaborate on what "this" and "it's" refer
| |
| 2723 UpdateHistograms(); | |
| 2724 | |
| 2721 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); | 2725 scoped_ptr<DictionaryValue> return_value(new DictionaryValue); |
| 2722 ListValue* browser_proc_list = new ListValue(); | 2726 ListValue* browser_proc_list = new ListValue(); |
| 2723 const std::vector<ProcessData>& all_processes = processes(); | 2727 const std::vector<ProcessData>& all_processes = processes(); |
| 2724 for (size_t index = 0; index < all_processes.size(); ++index) { | 2728 for (size_t index = 0; index < all_processes.size(); ++index) { |
| 2725 DictionaryValue* browser_data = new DictionaryValue(); | 2729 DictionaryValue* browser_data = new DictionaryValue(); |
| 2726 browser_data->SetString("name", all_processes[index].name); | 2730 browser_data->SetString("name", all_processes[index].name); |
| 2727 browser_data->SetString("process_name", all_processes[index].process_name); | 2731 browser_data->SetString("process_name", all_processes[index].process_name); |
| 2728 | 2732 |
| 2729 ListValue* proc_list = new ListValue(); | 2733 ListValue* proc_list = new ListValue(); |
| 2730 for (ProcessMemoryInformationList::const_iterator iterator = | 2734 for (ProcessMemoryInformationList::const_iterator iterator = |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3053 } | 3057 } |
| 3054 | 3058 |
| 3055 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); | 3059 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); |
| 3056 if (host->extension_id() == extension_id_ && | 3060 if (host->extension_id() == extension_id_ && |
| 3057 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { | 3061 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { |
| 3058 AutomationJSONReply(automation_, reply_message_.release()) | 3062 AutomationJSONReply(automation_, reply_message_.release()) |
| 3059 .SendSuccess(NULL); | 3063 .SendSuccess(NULL); |
| 3060 delete this; | 3064 delete this; |
| 3061 } | 3065 } |
| 3062 } | 3066 } |
| OLD | NEW |