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

Side by Side 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 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 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 #include "ppapi/c/ppb_audio_config.h" 62 #include "ppapi/c/ppb_audio_config.h"
63 #include "ppapi/c/ppb_core.h" 63 #include "ppapi/c/ppb_core.h"
64 #include "ppapi/c/ppb_gamepad.h" 64 #include "ppapi/c/ppb_gamepad.h"
65 #include "ppapi/c/ppp_input_event.h" 65 #include "ppapi/c/ppp_input_event.h"
66 #include "ppapi/c/ppp_instance.h" 66 #include "ppapi/c/ppp_instance.h"
67 #include "ppapi/c/ppp_messaging.h" 67 #include "ppapi/c/ppp_messaging.h"
68 #include "ppapi/c/ppp_mouse_lock.h" 68 #include "ppapi/c/ppp_mouse_lock.h"
69 #include "ppapi/c/private/ppp_instance_private.h" 69 #include "ppapi/c/private/ppp_instance_private.h"
70 #include "ppapi/host/ppapi_host.h" 70 #include "ppapi/host/ppapi_host.h"
71 #include "ppapi/proxy/ppapi_messages.h" 71 #include "ppapi/proxy/ppapi_messages.h"
72 #include "ppapi/proxy/uma_private_resource.h"
72 #include "ppapi/proxy/url_loader_resource.h" 73 #include "ppapi/proxy/url_loader_resource.h"
73 #include "ppapi/shared_impl/ppapi_permissions.h" 74 #include "ppapi/shared_impl/ppapi_permissions.h"
74 #include "ppapi/shared_impl/ppapi_preferences.h" 75 #include "ppapi/shared_impl/ppapi_preferences.h"
75 #include "ppapi/shared_impl/ppb_gamepad_shared.h" 76 #include "ppapi/shared_impl/ppb_gamepad_shared.h"
76 #include "ppapi/shared_impl/ppb_input_event_shared.h" 77 #include "ppapi/shared_impl/ppb_input_event_shared.h"
77 #include "ppapi/shared_impl/ppb_url_util_shared.h" 78 #include "ppapi/shared_impl/ppb_url_util_shared.h"
78 #include "ppapi/shared_impl/ppb_view_shared.h" 79 #include "ppapi/shared_impl/ppb_view_shared.h"
79 #include "ppapi/shared_impl/ppp_instance_combined.h" 80 #include "ppapi/shared_impl/ppp_instance_combined.h"
80 #include "ppapi/shared_impl/resource.h" 81 #include "ppapi/shared_impl/resource.h"
81 #include "ppapi/shared_impl/scoped_pp_resource.h" 82 #include "ppapi/shared_impl/scoped_pp_resource.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 plugin_mouse_lock_interface_(NULL), 502 plugin_mouse_lock_interface_(NULL),
502 plugin_pdf_interface_(NULL), 503 plugin_pdf_interface_(NULL),
503 plugin_private_interface_(NULL), 504 plugin_private_interface_(NULL),
504 plugin_selection_interface_(NULL), 505 plugin_selection_interface_(NULL),
505 plugin_textinput_interface_(NULL), 506 plugin_textinput_interface_(NULL),
506 plugin_zoom_interface_(NULL), 507 plugin_zoom_interface_(NULL),
507 checked_for_plugin_input_event_interface_(false), 508 checked_for_plugin_input_event_interface_(false),
508 checked_for_plugin_messaging_interface_(false), 509 checked_for_plugin_messaging_interface_(false),
509 checked_for_plugin_pdf_interface_(false), 510 checked_for_plugin_pdf_interface_(false),
510 gamepad_impl_(new GamepadImpl()), 511 gamepad_impl_(new GamepadImpl()),
512 uma_private_impl_(NULL),
511 plugin_print_interface_(NULL), 513 plugin_print_interface_(NULL),
512 plugin_graphics_3d_interface_(NULL), 514 plugin_graphics_3d_interface_(NULL),
513 always_on_top_(false), 515 always_on_top_(false),
514 fullscreen_container_(NULL), 516 fullscreen_container_(NULL),
515 flash_fullscreen_(false), 517 flash_fullscreen_(false),
516 desired_fullscreen_state_(false), 518 desired_fullscreen_state_(false),
517 sad_plugin_(NULL), 519 sad_plugin_(NULL),
518 input_event_mask_(0), 520 input_event_mask_(0),
519 filtered_input_event_mask_(0), 521 filtered_input_event_mask_(0),
520 text_input_type_(kPluginDefaultTextInputType), 522 text_input_type_(kPluginDefaultTextInputType),
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after
2403 case ppapi::FLASH_FULLSCREEN_SINGLETON_ID: 2405 case ppapi::FLASH_FULLSCREEN_SINGLETON_ID:
2404 case ppapi::FLASH_SINGLETON_ID: 2406 case ppapi::FLASH_SINGLETON_ID:
2405 case ppapi::ISOLATED_FILESYSTEM_SINGLETON_ID: 2407 case ppapi::ISOLATED_FILESYSTEM_SINGLETON_ID:
2406 case ppapi::NETWORK_PROXY_SINGLETON_ID: 2408 case ppapi::NETWORK_PROXY_SINGLETON_ID:
2407 case ppapi::PDF_SINGLETON_ID: 2409 case ppapi::PDF_SINGLETON_ID:
2408 case ppapi::TRUETYPE_FONT_SINGLETON_ID: 2410 case ppapi::TRUETYPE_FONT_SINGLETON_ID:
2409 NOTIMPLEMENTED(); 2411 NOTIMPLEMENTED();
2410 return NULL; 2412 return NULL;
2411 case ppapi::GAMEPAD_SINGLETON_ID: 2413 case ppapi::GAMEPAD_SINGLETON_ID:
2412 return gamepad_impl_.get(); 2414 return gamepad_impl_.get();
2415 case ppapi::UMA_SINGLETON_ID: {
2416 if (!uma_private_impl_) {
2417 RendererPpapiHostImpl* host_impl = module_->renderer_ppapi_host();
2418 if (host_impl->in_process_router()) {
2419 uma_private_impl_ = new ppapi::proxy::UMAPrivateResource(
2420 host_impl->in_process_router()->GetPluginConnection(instance),
2421 instance);
2422 }
2423 }
2424 return uma_private_impl_.get();
2425 }
2413 } 2426 }
2414 2427
2415 NOTREACHED(); 2428 NOTREACHED();
2416 return NULL; 2429 return NULL;
2417 } 2430 }
2418 2431
2419 int32_t PepperPluginInstanceImpl::RequestInputEvents(PP_Instance instance, 2432 int32_t PepperPluginInstanceImpl::RequestInputEvents(PP_Instance instance,
2420 uint32_t event_classes) { 2433 uint32_t event_classes) {
2421 input_event_mask_ |= event_classes; 2434 input_event_mask_ |= event_classes;
2422 filtered_input_event_mask_ &= ~(event_classes); 2435 filtered_input_event_mask_ &= ~(event_classes);
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
3087 // Running out-of-process. Initiate an IPC call to notify the plugin 3100 // Running out-of-process. Initiate an IPC call to notify the plugin
3088 // process. 3101 // process.
3089 ppapi::proxy::HostDispatcher* dispatcher = 3102 ppapi::proxy::HostDispatcher* dispatcher =
3090 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance()); 3103 ppapi::proxy::HostDispatcher::GetForInstance(pp_instance());
3091 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad( 3104 dispatcher->Send(new PpapiMsg_PPPInstance_HandleDocumentLoad(
3092 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data)); 3105 ppapi::API_ID_PPP_INSTANCE, pp_instance(), pending_host_id, data));
3093 } 3106 }
3094 } 3107 }
3095 3108
3096 } // namespace content 3109 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698