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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.cc

Issue 61643022: Proxy private UMA pepper interface for out-of-process and NaCl plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused histogram names Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 3ef54aaabcdfd0d8c951af4f556c9a43c04edd38..2d1b517376ef77438768f376746952a277e53c1d 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -69,6 +69,7 @@
#include "ppapi/c/private/ppp_instance_private.h"
#include "ppapi/host/ppapi_host.h"
#include "ppapi/proxy/ppapi_messages.h"
+#include "ppapi/proxy/uma_private_resource.h"
#include "ppapi/proxy/url_loader_resource.h"
#include "ppapi/shared_impl/ppapi_permissions.h"
#include "ppapi/shared_impl/ppapi_preferences.h"
@@ -508,6 +509,7 @@ PepperPluginInstanceImpl::PepperPluginInstanceImpl(
checked_for_plugin_messaging_interface_(false),
checked_for_plugin_pdf_interface_(false),
gamepad_impl_(new GamepadImpl()),
+ uma_private_impl_(NULL),
plugin_print_interface_(NULL),
plugin_graphics_3d_interface_(NULL),
always_on_top_(false),
@@ -2410,6 +2412,17 @@ ppapi::Resource* PepperPluginInstanceImpl::GetSingletonResource(
return NULL;
case ppapi::GAMEPAD_SINGLETON_ID:
return gamepad_impl_.get();
+ case ppapi::UMA_SINGLETON_ID: {
+ if (!uma_private_impl_) {
+ RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host();
+ if (host_impl->in_process_router()) {
+ uma_private_impl_ = new ppapi::proxy::UMAPrivateResource(
+ host_impl->in_process_router()->GetPluginConnection(instance),
+ instance);
+ }
+ }
+ return uma_private_impl_.get();
+ }
}
NOTREACHED();

Powered by Google App Engine
This is Rietveld 408576698