OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/webui/memory_internals/memory_internals_proxy.h" | 5 #include "chrome/browser/ui/webui/memory_internals/memory_internals_proxy.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 handler_ = NULL; | 195 handler_ = NULL; |
196 } | 196 } |
197 | 197 |
198 void MemoryInternalsProxy::StartFetch(const base::ListValue* list) { | 198 void MemoryInternalsProxy::StartFetch(const base::ListValue* list) { |
199 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 199 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
200 | 200 |
201 // Clear previous information before fetching new information. | 201 // Clear previous information before fetching new information. |
202 information_->Clear(); | 202 information_->Clear(); |
203 scoped_refptr<ProcessDetails> process(new ProcessDetails( | 203 scoped_refptr<ProcessDetails> process(new ProcessDetails( |
204 base::Bind(&MemoryInternalsProxy::OnProcessAvailable, this))); | 204 base::Bind(&MemoryInternalsProxy::OnProcessAvailable, this))); |
205 process->StartFetch(MemoryDetails::SKIP_USER_METRICS); | 205 process->StartFetch(); |
206 } | 206 } |
207 | 207 |
208 MemoryInternalsProxy::~MemoryInternalsProxy() {} | 208 MemoryInternalsProxy::~MemoryInternalsProxy() {} |
209 | 209 |
210 void MemoryInternalsProxy::RequestRendererDetails() { | 210 void MemoryInternalsProxy::RequestRendererDetails() { |
211 renderer_details_->Clear(); | 211 renderer_details_->Clear(); |
212 | 212 |
213 #if defined(OS_ANDROID) | 213 #if defined(OS_ANDROID) |
214 for (TabModelList::const_iterator iter = TabModelList::begin(); | 214 for (TabModelList::const_iterator iter = TabModelList::begin(); |
215 iter != TabModelList::end(); ++iter) { | 215 iter != TabModelList::end(); ++iter) { |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 const std::string& function, const base::Value& args) { | 347 const std::string& function, const base::Value& args) { |
348 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 348 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
349 | 349 |
350 std::vector<const base::Value*> args_vector(1, &args); | 350 std::vector<const base::Value*> args_vector(1, &args); |
351 base::string16 update = | 351 base::string16 update = |
352 content::WebUI::GetJavascriptCall(function, args_vector); | 352 content::WebUI::GetJavascriptCall(function, args_vector); |
353 // Don't forward updates to a destructed UI. | 353 // Don't forward updates to a destructed UI. |
354 if (handler_) | 354 if (handler_) |
355 handler_->OnUpdate(update); | 355 handler_->OnUpdate(update); |
356 } | 356 } |
OLD | NEW |