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

Side by Side Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1014543003: Add an IPC method for Blink to call RapporService::RecordSample() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed to ETLD_PLUS_ONE Created 5 years, 9 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
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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
1530 // Dispatch control messages. 1530 // Dispatch control messages.
1531 IPC_BEGIN_MESSAGE_MAP(RenderProcessHostImpl, msg) 1531 IPC_BEGIN_MESSAGE_MAP(RenderProcessHostImpl, msg)
1532 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ShutdownRequest, 1532 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_ShutdownRequest,
1533 OnShutdownRequest) 1533 OnShutdownRequest)
1534 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_DumpHandlesDone, 1534 IPC_MESSAGE_HANDLER(ChildProcessHostMsg_DumpHandlesDone,
1535 OnDumpHandlesDone) 1535 OnDumpHandlesDone)
1536 IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged, 1536 IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged,
1537 SuddenTerminationChanged) 1537 SuddenTerminationChanged)
1538 IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction, 1538 IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction,
1539 OnUserMetricsRecordAction) 1539 OnUserMetricsRecordAction)
1540 IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordRappor,
1541 OnUserMetricsRecordRappor)
1540 IPC_MESSAGE_HANDLER(ViewHostMsg_SavedPageAsMHTML, OnSavedPageAsMHTML) 1542 IPC_MESSAGE_HANDLER(ViewHostMsg_SavedPageAsMHTML, OnSavedPageAsMHTML)
1541 IPC_MESSAGE_HANDLER(ViewHostMsg_Close_ACK, OnCloseACK) 1543 IPC_MESSAGE_HANDLER(ViewHostMsg_Close_ACK, OnCloseACK)
1542 #if defined(ENABLE_WEBRTC) 1544 #if defined(ENABLE_WEBRTC)
1543 IPC_MESSAGE_HANDLER(AecDumpMsg_RegisterAecDumpConsumer, 1545 IPC_MESSAGE_HANDLER(AecDumpMsg_RegisterAecDumpConsumer,
1544 OnRegisterAecDumpConsumer) 1546 OnRegisterAecDumpConsumer)
1545 IPC_MESSAGE_HANDLER(AecDumpMsg_UnregisterAecDumpConsumer, 1547 IPC_MESSAGE_HANDLER(AecDumpMsg_UnregisterAecDumpConsumer,
1546 OnUnregisterAecDumpConsumer) 1548 OnUnregisterAecDumpConsumer)
1547 #endif 1549 #endif
1548 // Adding single handlers for your service here is fine, but once your 1550 // Adding single handlers for your service here is fine, but once your
1549 // service needs more than one handler, please extract them into a new 1551 // service needs more than one handler, please extract them into a new
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
2363 scoped_refptr<AudioRendererHost> 2365 scoped_refptr<AudioRendererHost>
2364 RenderProcessHostImpl::audio_renderer_host() const { 2366 RenderProcessHostImpl::audio_renderer_host() const {
2365 return audio_renderer_host_; 2367 return audio_renderer_host_;
2366 } 2368 }
2367 2369
2368 void RenderProcessHostImpl::OnUserMetricsRecordAction( 2370 void RenderProcessHostImpl::OnUserMetricsRecordAction(
2369 const std::string& action) { 2371 const std::string& action) {
2370 RecordComputedAction(action); 2372 RecordComputedAction(action);
2371 } 2373 }
2372 2374
2375 void RenderProcessHostImpl::OnUserMetricsRecordRappor(
2376 const std::string& metric,
2377 const std::string& sample) {
2378 RecordRappor(metric, sample);
2379 }
2380
2373 void RenderProcessHostImpl::OnCloseACK(int old_route_id) { 2381 void RenderProcessHostImpl::OnCloseACK(int old_route_id) {
2374 SessionStorageHolder* holder = static_cast<SessionStorageHolder*> 2382 SessionStorageHolder* holder = static_cast<SessionStorageHolder*>
2375 (GetUserData(kSessionStorageHolderKey)); 2383 (GetUserData(kSessionStorageHolderKey));
2376 if (!holder) 2384 if (!holder)
2377 return; 2385 return;
2378 holder->Release(old_route_id); 2386 holder->Release(old_route_id);
2379 } 2387 }
2380 2388
2381 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { 2389 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) {
2382 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); 2390 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2489 if (worker_ref_count_ == 0) 2497 if (worker_ref_count_ == 0)
2490 Cleanup(); 2498 Cleanup();
2491 } 2499 }
2492 2500
2493 void RenderProcessHostImpl::GetAudioOutputControllers( 2501 void RenderProcessHostImpl::GetAudioOutputControllers(
2494 const GetAudioOutputControllersCallback& callback) const { 2502 const GetAudioOutputControllersCallback& callback) const {
2495 audio_renderer_host()->GetOutputControllers(callback); 2503 audio_renderer_host()->GetOutputControllers(callback);
2496 } 2504 }
2497 2505
2498 } // namespace content 2506 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698