#include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
+#include "base/metrics/sparse_histogram.h"
#include "content/browser/renderer_host/pepper/pepper_message_filter.h"
#include "content/browser/tracing/trace_message_filter.h"
#include "content/common/pepper_renderer_instance_data.h"
IPC_BEGIN_MESSAGE_MAP(BrowserPpapiHostImpl::HostMessageFilter, msg)
// Add necessary message handlers here.
IPC_MESSAGE_HANDLER(PpapiHostMsg_Keepalive, OnKeepalive)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_LogInterfaceUsage,
+ OnHostMsgLogInterfaceUsage)
IPC_MESSAGE_UNHANDLED(handled = ppapi_host_->OnMessageReceived(msg))
IPC_END_MESSAGE_MAP();
return handled;
browser_ppapi_host_impl_->OnKeepalive();
}
+void BrowserPpapiHostImpl::HostMessageFilter::OnHostMsgLogInterfaceUsage(
+ int hash) const {
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Pepper.InterfaceUsed", hash);
+}
+
void BrowserPpapiHostImpl::OnKeepalive() {
// An instance has been active. The on_keepalive_callback_ will be
// used to permit the content embedder to handle this, e.g. by tracking