Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: chrome/browser/renderer_host/chrome_render_message_filter.cc

Issue 319953002: Task Manager: Remove dead FPS code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/renderer_host/chrome_render_message_filter.h" 5 #include "chrome/browser/renderer_host/chrome_render_message_filter.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 bool ChromeRenderMessageFilter::OnMessageReceived(const IPC::Message& message) { 58 bool ChromeRenderMessageFilter::OnMessageReceived(const IPC::Message& message) {
59 bool handled = true; 59 bool handled = true;
60 IPC_BEGIN_MESSAGE_MAP(ChromeRenderMessageFilter, message) 60 IPC_BEGIN_MESSAGE_MAP(ChromeRenderMessageFilter, message)
61 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DnsPrefetch, OnDnsPrefetch) 61 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_DnsPrefetch, OnDnsPrefetch)
62 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_Preconnect, OnPreconnect) 62 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_Preconnect, OnPreconnect)
63 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ResourceTypeStats, 63 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ResourceTypeStats,
64 OnResourceTypeStats) 64 OnResourceTypeStats)
65 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_UpdatedCacheStats, 65 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_UpdatedCacheStats,
66 OnUpdatedCacheStats) 66 OnUpdatedCacheStats)
67 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FPS, OnFPS)
68 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_V8HeapStats, OnV8HeapStats) 67 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_V8HeapStats, OnV8HeapStats)
69 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_AllowDatabase, OnAllowDatabase) 68 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_AllowDatabase, OnAllowDatabase)
70 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_AllowDOMStorage, OnAllowDOMStorage) 69 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_AllowDOMStorage, OnAllowDOMStorage)
71 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RequestFileSystemAccessSync, 70 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RequestFileSystemAccessSync,
72 OnRequestFileSystemAccessSync) 71 OnRequestFileSystemAccessSync)
73 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RequestFileSystemAccessAsync, 72 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_RequestFileSystemAccessAsync,
74 OnRequestFileSystemAccessAsync) 73 OnRequestFileSystemAccessAsync)
75 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_AllowIndexedDB, OnAllowIndexedDB) 74 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_AllowIndexedDB, OnAllowIndexedDB)
76 #if defined(ENABLE_PLUGINS) 75 #if defined(ENABLE_PLUGINS)
77 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_IsCrashReportingEnabled, 76 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_IsCrashReportingEnabled,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 TaskManager::GetInstance()->model()->NotifyResourceTypeStats(peer_pid(), 124 TaskManager::GetInstance()->model()->NotifyResourceTypeStats(peer_pid(),
126 stats); 125 stats);
127 #endif // defined(ENABLE_TASK_MANAGER) 126 #endif // defined(ENABLE_TASK_MANAGER)
128 } 127 }
129 128
130 void ChromeRenderMessageFilter::OnUpdatedCacheStats( 129 void ChromeRenderMessageFilter::OnUpdatedCacheStats(
131 const WebCache::UsageStats& stats) { 130 const WebCache::UsageStats& stats) {
132 WebCacheManager::GetInstance()->ObserveStats(render_process_id_, stats); 131 WebCacheManager::GetInstance()->ObserveStats(render_process_id_, stats);
133 } 132 }
134 133
135 void ChromeRenderMessageFilter::OnFPS(int routing_id, float fps) {
136 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
137 BrowserThread::PostTask(
138 BrowserThread::UI, FROM_HERE,
139 base::Bind(
140 &ChromeRenderMessageFilter::OnFPS, this,
141 routing_id, fps));
142 return;
143 }
144
145 #if defined(ENABLE_TASK_MANAGER)
146 TaskManager::GetInstance()->model()->NotifyFPS(
147 peer_pid(), routing_id, fps);
148 #endif // defined(ENABLE_TASK_MANAGER)
149 }
150
151 void ChromeRenderMessageFilter::OnV8HeapStats(int v8_memory_allocated, 134 void ChromeRenderMessageFilter::OnV8HeapStats(int v8_memory_allocated,
152 int v8_memory_used) { 135 int v8_memory_used) {
153 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) { 136 if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
154 BrowserThread::PostTask( 137 BrowserThread::PostTask(
155 BrowserThread::UI, FROM_HERE, 138 BrowserThread::UI, FROM_HERE,
156 base::Bind(&ChromeRenderMessageFilter::OnV8HeapStats, this, 139 base::Bind(&ChromeRenderMessageFilter::OnV8HeapStats, this,
157 v8_memory_allocated, v8_memory_used)); 140 v8_memory_allocated, v8_memory_used));
158 return; 141 return;
159 } 142 }
160 143
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 base::Bind(&TabSpecificContentSettings::IndexedDBAccessed, 239 base::Bind(&TabSpecificContentSettings::IndexedDBAccessed,
257 render_process_id_, render_frame_id, origin_url, name, 240 render_process_id_, render_frame_id, origin_url, name,
258 !*allowed)); 241 !*allowed));
259 } 242 }
260 243
261 #if defined(ENABLE_PLUGINS) 244 #if defined(ENABLE_PLUGINS)
262 void ChromeRenderMessageFilter::OnIsCrashReportingEnabled(bool* enabled) { 245 void ChromeRenderMessageFilter::OnIsCrashReportingEnabled(bool* enabled) {
263 *enabled = ChromeMetricsServiceAccessor::IsCrashReportingEnabled(); 246 *enabled = ChromeMetricsServiceAccessor::IsCrashReportingEnabled();
264 } 247 }
265 #endif 248 #endif
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/chrome_render_message_filter.h ('k') | chrome/browser/task_manager/renderer_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698