| OLD | NEW |
| 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 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 blink::WebURLLoaderClient* document_loader() const { | 350 blink::WebURLLoaderClient* document_loader() const { |
| 351 return document_loader_; | 351 return document_loader_; |
| 352 } | 352 } |
| 353 void set_document_loader(blink::WebURLLoaderClient* loader) { | 353 void set_document_loader(blink::WebURLLoaderClient* loader) { |
| 354 document_loader_ = loader; | 354 document_loader_ = loader; |
| 355 } | 355 } |
| 356 | 356 |
| 357 ContentDecryptorDelegate* GetContentDecryptorDelegate(); | 357 ContentDecryptorDelegate* GetContentDecryptorDelegate(); |
| 358 | 358 |
| 359 // PluginInstance implementation | 359 // PluginInstance implementation |
| 360 virtual RenderView* GetRenderView() override; | 360 RenderView* GetRenderView() override; |
| 361 virtual blink::WebPluginContainer* GetContainer() override; | 361 blink::WebPluginContainer* GetContainer() override; |
| 362 virtual v8::Isolate* GetIsolate() const override; | 362 v8::Isolate* GetIsolate() const override; |
| 363 virtual ppapi::VarTracker* GetVarTracker() override; | 363 ppapi::VarTracker* GetVarTracker() override; |
| 364 virtual const GURL& GetPluginURL() override; | 364 const GURL& GetPluginURL() override; |
| 365 virtual base::FilePath GetModulePath() override; | 365 base::FilePath GetModulePath() override; |
| 366 virtual PP_Resource CreateImage(gfx::ImageSkia* source_image, | 366 PP_Resource CreateImage(gfx::ImageSkia* source_image, float scale) override; |
| 367 float scale) override; | 367 PP_ExternalPluginResult SwitchToOutOfProcessProxy( |
| 368 virtual PP_ExternalPluginResult SwitchToOutOfProcessProxy( | |
| 369 const base::FilePath& file_path, | 368 const base::FilePath& file_path, |
| 370 ppapi::PpapiPermissions permissions, | 369 ppapi::PpapiPermissions permissions, |
| 371 const IPC::ChannelHandle& channel_handle, | 370 const IPC::ChannelHandle& channel_handle, |
| 372 base::ProcessId plugin_pid, | 371 base::ProcessId plugin_pid, |
| 373 int plugin_child_id) override; | 372 int plugin_child_id) override; |
| 374 virtual void SetAlwaysOnTop(bool on_top) override; | 373 void SetAlwaysOnTop(bool on_top) override; |
| 375 virtual bool IsFullPagePlugin() override; | 374 bool IsFullPagePlugin() override; |
| 376 virtual bool FlashSetFullscreen(bool fullscreen, bool delay_report) override; | 375 bool FlashSetFullscreen(bool fullscreen, bool delay_report) override; |
| 377 virtual bool IsRectTopmost(const gfx::Rect& rect) override; | 376 bool IsRectTopmost(const gfx::Rect& rect) override; |
| 378 virtual int32_t Navigate(const ppapi::URLRequestInfoData& request, | 377 int32_t Navigate(const ppapi::URLRequestInfoData& request, |
| 379 const char* target, | 378 const char* target, |
| 380 bool from_user_action) override; | 379 bool from_user_action) override; |
| 381 virtual int MakePendingFileRefRendererHost(const base::FilePath& path) | 380 int MakePendingFileRefRendererHost(const base::FilePath& path) override; |
| 382 override; | 381 void SetEmbedProperty(PP_Var key, PP_Var value) override; |
| 383 virtual void SetEmbedProperty(PP_Var key, PP_Var value) override; | 382 void SetSelectedText(const base::string16& selected_text) override; |
| 384 virtual void SetSelectedText(const base::string16& selected_text) override; | 383 void SetLinkUnderCursor(const std::string& url) override; |
| 385 virtual void SetLinkUnderCursor(const std::string& url) override; | 384 void SetTextInputType(ui::TextInputType type) override; |
| 386 virtual void SetTextInputType(ui::TextInputType type) override; | 385 void PostMessageToJavaScript(PP_Var message) override; |
| 387 virtual void PostMessageToJavaScript(PP_Var message) override; | |
| 388 | 386 |
| 389 // PPB_Instance_API implementation. | 387 // PPB_Instance_API implementation. |
| 390 virtual PP_Bool BindGraphics(PP_Instance instance, | 388 PP_Bool BindGraphics(PP_Instance instance, PP_Resource device) override; |
| 391 PP_Resource device) override; | 389 PP_Bool IsFullFrame(PP_Instance instance) override; |
| 392 virtual PP_Bool IsFullFrame(PP_Instance instance) override; | 390 const ppapi::ViewData* GetViewData(PP_Instance instance) override; |
| 393 virtual const ppapi::ViewData* GetViewData(PP_Instance instance) override; | 391 PP_Bool FlashIsFullscreen(PP_Instance instance) override; |
| 394 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) override; | 392 PP_Var GetWindowObject(PP_Instance instance) override; |
| 395 virtual PP_Var GetWindowObject(PP_Instance instance) override; | 393 PP_Var GetOwnerElementObject(PP_Instance instance) override; |
| 396 virtual PP_Var GetOwnerElementObject(PP_Instance instance) override; | 394 PP_Var ExecuteScript(PP_Instance instance, |
| 397 virtual PP_Var ExecuteScript(PP_Instance instance, | 395 PP_Var script, |
| 398 PP_Var script, | 396 PP_Var* exception) override; |
| 399 PP_Var* exception) override; | 397 uint32_t GetAudioHardwareOutputSampleRate(PP_Instance instance) override; |
| 400 virtual uint32_t GetAudioHardwareOutputSampleRate(PP_Instance instance) | 398 uint32_t GetAudioHardwareOutputBufferSize(PP_Instance instance) override; |
| 401 override; | 399 PP_Var GetDefaultCharSet(PP_Instance instance) override; |
| 402 virtual uint32_t GetAudioHardwareOutputBufferSize(PP_Instance instance) | 400 void SetPluginToHandleFindRequests(PP_Instance) override; |
| 403 override; | 401 void NumberOfFindResultsChanged(PP_Instance instance, |
| 404 virtual PP_Var GetDefaultCharSet(PP_Instance instance) override; | 402 int32_t total, |
| 405 virtual void SetPluginToHandleFindRequests(PP_Instance) override; | 403 PP_Bool final_result) override; |
| 406 virtual void NumberOfFindResultsChanged(PP_Instance instance, | 404 void SelectedFindResultChanged(PP_Instance instance, int32_t index) override; |
| 407 int32_t total, | 405 void SetTickmarks(PP_Instance instance, |
| 408 PP_Bool final_result) override; | 406 const PP_Rect* tickmarks, |
| 409 virtual void SelectedFindResultChanged(PP_Instance instance, | 407 uint32_t count) override; |
| 410 int32_t index) override; | 408 PP_Bool IsFullscreen(PP_Instance instance) override; |
| 411 virtual void SetTickmarks(PP_Instance instance, | 409 PP_Bool SetFullscreen(PP_Instance instance, PP_Bool fullscreen) override; |
| 412 const PP_Rect* tickmarks, | 410 PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) override; |
| 413 uint32_t count) override; | 411 ppapi::Resource* GetSingletonResource(PP_Instance instance, |
| 414 virtual PP_Bool IsFullscreen(PP_Instance instance) override; | 412 ppapi::SingletonResourceID id) override; |
| 415 virtual PP_Bool SetFullscreen(PP_Instance instance, | 413 int32_t RequestInputEvents(PP_Instance instance, |
| 416 PP_Bool fullscreen) override; | 414 uint32_t event_classes) override; |
| 417 virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) override; | 415 int32_t RequestFilteringInputEvents(PP_Instance instance, |
| 418 virtual ppapi::Resource* GetSingletonResource(PP_Instance instance, | |
| 419 ppapi::SingletonResourceID id) | |
| 420 override; | |
| 421 virtual int32_t RequestInputEvents(PP_Instance instance, | |
| 422 uint32_t event_classes) override; | |
| 423 virtual int32_t RequestFilteringInputEvents(PP_Instance instance, | |
| 424 uint32_t event_classes) override; | |
| 425 virtual void ClearInputEventRequest(PP_Instance instance, | |
| 426 uint32_t event_classes) override; | 416 uint32_t event_classes) override; |
| 427 virtual void StartTrackingLatency(PP_Instance instance) override; | 417 void ClearInputEventRequest(PP_Instance instance, |
| 428 virtual void ZoomChanged(PP_Instance instance, double factor) override; | 418 uint32_t event_classes) override; |
| 429 virtual void ZoomLimitsChanged(PP_Instance instance, | 419 void StartTrackingLatency(PP_Instance instance) override; |
| 430 double minimum_factor, | 420 void ZoomChanged(PP_Instance instance, double factor) override; |
| 431 double maximum_factor) override; | 421 void ZoomLimitsChanged(PP_Instance instance, |
| 432 virtual void PostMessage(PP_Instance instance, PP_Var message) override; | 422 double minimum_factor, |
| 433 virtual int32_t RegisterMessageHandler(PP_Instance instance, | 423 double maximum_factor) override; |
| 434 void* user_data, | 424 void PostMessage(PP_Instance instance, PP_Var message) override; |
| 435 const PPP_MessageHandler_0_2* handler, | 425 int32_t RegisterMessageHandler(PP_Instance instance, |
| 436 PP_Resource message_loop) override; | 426 void* user_data, |
| 437 virtual int32_t RegisterMessageHandler_1_1_Deprecated( | 427 const PPP_MessageHandler_0_2* handler, |
| 428 PP_Resource message_loop) override; |
| 429 int32_t RegisterMessageHandler_1_1_Deprecated( |
| 438 PP_Instance instance, | 430 PP_Instance instance, |
| 439 void* user_data, | 431 void* user_data, |
| 440 const PPP_MessageHandler_0_1_Deprecated* handler, | 432 const PPP_MessageHandler_0_1_Deprecated* handler, |
| 441 PP_Resource message_loop) override; | 433 PP_Resource message_loop) override; |
| 442 virtual void UnregisterMessageHandler(PP_Instance instance) override; | 434 void UnregisterMessageHandler(PP_Instance instance) override; |
| 443 virtual PP_Bool SetCursor(PP_Instance instance, | 435 PP_Bool SetCursor(PP_Instance instance, |
| 444 PP_MouseCursor_Type type, | 436 PP_MouseCursor_Type type, |
| 445 PP_Resource image, | 437 PP_Resource image, |
| 446 const PP_Point* hot_spot) override; | 438 const PP_Point* hot_spot) override; |
| 447 virtual int32_t LockMouse(PP_Instance instance, | 439 int32_t LockMouse(PP_Instance instance, |
| 448 scoped_refptr<ppapi::TrackedCallback> callback) | 440 scoped_refptr<ppapi::TrackedCallback> callback) override; |
| 449 override; | 441 void UnlockMouse(PP_Instance instance) override; |
| 450 virtual void UnlockMouse(PP_Instance instance) override; | 442 void SetTextInputType(PP_Instance instance, PP_TextInput_Type type) override; |
| 451 virtual void SetTextInputType(PP_Instance instance, | 443 void UpdateCaretPosition(PP_Instance instance, |
| 452 PP_TextInput_Type type) override; | 444 const PP_Rect& caret, |
| 453 virtual void UpdateCaretPosition(PP_Instance instance, | 445 const PP_Rect& bounding_box) override; |
| 454 const PP_Rect& caret, | 446 void CancelCompositionText(PP_Instance instance) override; |
| 455 const PP_Rect& bounding_box) override; | 447 void SelectionChanged(PP_Instance instance) override; |
| 456 virtual void CancelCompositionText(PP_Instance instance) override; | 448 void UpdateSurroundingText(PP_Instance instance, |
| 457 virtual void SelectionChanged(PP_Instance instance) override; | 449 const char* text, |
| 458 virtual void UpdateSurroundingText(PP_Instance instance, | 450 uint32_t caret, |
| 459 const char* text, | 451 uint32_t anchor) override; |
| 460 uint32_t caret, | 452 PP_Var ResolveRelativeToDocument(PP_Instance instance, |
| 461 uint32_t anchor) override; | 453 PP_Var relative, |
| 462 virtual PP_Var ResolveRelativeToDocument(PP_Instance instance, | 454 PP_URLComponents_Dev* components) override; |
| 463 PP_Var relative, | 455 PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) override; |
| 464 PP_URLComponents_Dev* components) | 456 PP_Bool DocumentCanAccessDocument(PP_Instance instance, |
| 465 override; | 457 PP_Instance target) override; |
| 466 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) override; | 458 PP_Var GetDocumentURL(PP_Instance instance, |
| 467 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, | 459 PP_URLComponents_Dev* components) override; |
| 468 PP_Instance target) override; | 460 PP_Var GetPluginInstanceURL(PP_Instance instance, |
| 469 virtual PP_Var GetDocumentURL(PP_Instance instance, | 461 PP_URLComponents_Dev* components) override; |
| 470 PP_URLComponents_Dev* components) override; | 462 PP_Var GetPluginReferrerURL(PP_Instance instance, |
| 471 virtual PP_Var GetPluginInstanceURL(PP_Instance instance, | 463 PP_URLComponents_Dev* components) override; |
| 472 PP_URLComponents_Dev* components) | |
| 473 override; | |
| 474 virtual PP_Var GetPluginReferrerURL(PP_Instance instance, | |
| 475 PP_URLComponents_Dev* components) | |
| 476 override; | |
| 477 | 464 |
| 478 // PPB_ContentDecryptor_Private implementation. | 465 // PPB_ContentDecryptor_Private implementation. |
| 479 virtual void PromiseResolved(PP_Instance instance, | 466 void PromiseResolved(PP_Instance instance, uint32 promise_id) override; |
| 480 uint32 promise_id) override; | 467 void PromiseResolvedWithSession(PP_Instance instance, |
| 481 virtual void PromiseResolvedWithSession(PP_Instance instance, | 468 uint32 promise_id, |
| 482 uint32 promise_id, | 469 PP_Var web_session_id_var) override; |
| 483 PP_Var web_session_id_var) override; | 470 void PromiseResolvedWithKeyIds(PP_Instance instance, |
| 484 virtual void PromiseResolvedWithKeyIds(PP_Instance instance, | 471 uint32 promise_id, |
| 485 uint32 promise_id, | 472 PP_Var key_ids_var) override; |
| 486 PP_Var key_ids_var) override; | 473 void PromiseRejected(PP_Instance instance, |
| 487 virtual void PromiseRejected(PP_Instance instance, | 474 uint32 promise_id, |
| 488 uint32 promise_id, | 475 PP_CdmExceptionCode exception_code, |
| 489 PP_CdmExceptionCode exception_code, | 476 uint32 system_code, |
| 490 uint32 system_code, | 477 PP_Var error_description_var) override; |
| 491 PP_Var error_description_var) override; | 478 void SessionMessage(PP_Instance instance, |
| 492 virtual void SessionMessage(PP_Instance instance, | 479 PP_Var web_session_id_var, |
| 493 PP_Var web_session_id_var, | 480 PP_Var message_var, |
| 494 PP_Var message_var, | 481 PP_Var destination_url_var) override; |
| 495 PP_Var destination_url_var) override; | 482 void SessionKeysChange(PP_Instance instance, |
| 496 virtual void SessionKeysChange(PP_Instance instance, | 483 PP_Var web_session_id_var, |
| 497 PP_Var web_session_id_var, | 484 PP_Bool has_additional_usable_key) override; |
| 498 PP_Bool has_additional_usable_key) override; | 485 void SessionExpirationChange(PP_Instance instance, |
| 499 virtual void SessionExpirationChange(PP_Instance instance, | 486 PP_Var web_session_id_var, |
| 500 PP_Var web_session_id_var, | 487 PP_Time new_expiry_time) override; |
| 501 PP_Time new_expiry_time) override; | 488 void SessionReady(PP_Instance instance, PP_Var web_session_id_var) override; |
| 502 virtual void SessionReady(PP_Instance instance, | 489 void SessionClosed(PP_Instance instance, PP_Var web_session_id_var) override; |
| 503 PP_Var web_session_id_var) override; | 490 void SessionError(PP_Instance instance, |
| 504 virtual void SessionClosed(PP_Instance instance, | 491 PP_Var web_session_id_var, |
| 505 PP_Var web_session_id_var) override; | 492 PP_CdmExceptionCode exception_code, |
| 506 virtual void SessionError(PP_Instance instance, | 493 uint32 system_code, |
| 507 PP_Var web_session_id_var, | 494 PP_Var error_description_var) override; |
| 508 PP_CdmExceptionCode exception_code, | 495 void DeliverBlock(PP_Instance instance, |
| 509 uint32 system_code, | 496 PP_Resource decrypted_block, |
| 510 PP_Var error_description_var) override; | 497 const PP_DecryptedBlockInfo* block_info) override; |
| 511 virtual void DeliverBlock(PP_Instance instance, | 498 void DecoderInitializeDone(PP_Instance instance, |
| 512 PP_Resource decrypted_block, | 499 PP_DecryptorStreamType decoder_type, |
| 513 const PP_DecryptedBlockInfo* block_info) override; | 500 uint32_t request_id, |
| 514 virtual void DecoderInitializeDone(PP_Instance instance, | 501 PP_Bool success) override; |
| 515 PP_DecryptorStreamType decoder_type, | 502 void DecoderDeinitializeDone(PP_Instance instance, |
| 516 uint32_t request_id, | 503 PP_DecryptorStreamType decoder_type, |
| 517 PP_Bool success) override; | 504 uint32_t request_id) override; |
| 518 virtual void DecoderDeinitializeDone(PP_Instance instance, | 505 void DecoderResetDone(PP_Instance instance, |
| 519 PP_DecryptorStreamType decoder_type, | 506 PP_DecryptorStreamType decoder_type, |
| 520 uint32_t request_id) override; | 507 uint32_t request_id) override; |
| 521 virtual void DecoderResetDone(PP_Instance instance, | 508 void DeliverFrame(PP_Instance instance, |
| 522 PP_DecryptorStreamType decoder_type, | 509 PP_Resource decrypted_frame, |
| 523 uint32_t request_id) override; | 510 const PP_DecryptedFrameInfo* frame_info) override; |
| 524 virtual void DeliverFrame(PP_Instance instance, | 511 void DeliverSamples(PP_Instance instance, |
| 525 PP_Resource decrypted_frame, | 512 PP_Resource audio_frames, |
| 526 const PP_DecryptedFrameInfo* frame_info) override; | 513 const PP_DecryptedSampleInfo* sample_info) override; |
| 527 virtual void DeliverSamples(PP_Instance instance, | |
| 528 PP_Resource audio_frames, | |
| 529 const PP_DecryptedSampleInfo* sample_info) | |
| 530 override; | |
| 531 | 514 |
| 532 // Reset this instance as proxied. Assigns the instance a new module, resets | 515 // Reset this instance as proxied. Assigns the instance a new module, resets |
| 533 // cached interfaces to point to the out-of-process proxy and re-sends | 516 // cached interfaces to point to the out-of-process proxy and re-sends |
| 534 // DidCreate, DidChangeView, and HandleDocumentLoad (if necessary). | 517 // DidCreate, DidChangeView, and HandleDocumentLoad (if necessary). |
| 535 // This should be used only when switching an in-process instance to an | 518 // This should be used only when switching an in-process instance to an |
| 536 // external out-of-process instance. | 519 // external out-of-process instance. |
| 537 PP_ExternalPluginResult ResetAsProxied(scoped_refptr<PluginModule> module); | 520 PP_ExternalPluginResult ResetAsProxied(scoped_refptr<PluginModule> module); |
| 538 | 521 |
| 539 // Checks whether this is a valid instance of the given module. After calling | 522 // Checks whether this is a valid instance of the given module. After calling |
| 540 // ResetAsProxied above, a NaCl plugin instance's module changes, so external | 523 // ResetAsProxied above, a NaCl plugin instance's module changes, so external |
| 541 // hosts won't recognize it as a valid instance of the original module. This | 524 // hosts won't recognize it as a valid instance of the original module. This |
| 542 // method fixes that be checking that either module_ or original_module_ match | 525 // method fixes that be checking that either module_ or original_module_ match |
| 543 // the given module. | 526 // the given module. |
| 544 bool IsValidInstanceOf(PluginModule* module); | 527 bool IsValidInstanceOf(PluginModule* module); |
| 545 | 528 |
| 546 // cc::TextureLayerClient implementation. | 529 // cc::TextureLayerClient implementation. |
| 547 virtual bool PrepareTextureMailbox( | 530 bool PrepareTextureMailbox( |
| 548 cc::TextureMailbox* mailbox, | 531 cc::TextureMailbox* mailbox, |
| 549 scoped_ptr<cc::SingleReleaseCallback>* release_callback, | 532 scoped_ptr<cc::SingleReleaseCallback>* release_callback, |
| 550 bool use_shared_memory) override; | 533 bool use_shared_memory) override; |
| 551 | 534 |
| 552 // RenderFrameObserver | 535 // RenderFrameObserver |
| 553 virtual void OnDestruct() override; | 536 void OnDestruct() override; |
| 554 | 537 |
| 555 void AddLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info); | 538 void AddLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info); |
| 556 | 539 |
| 557 private: | 540 private: |
| 558 friend class base::RefCounted<PepperPluginInstanceImpl>; | 541 friend class base::RefCounted<PepperPluginInstanceImpl>; |
| 559 friend class PpapiPluginInstanceTest; | 542 friend class PpapiPluginInstanceTest; |
| 560 friend class PpapiUnittest; | 543 friend class PpapiUnittest; |
| 561 | 544 |
| 562 // Delete should be called by the WebPlugin before this destructor. | 545 // Delete should be called by the WebPlugin before this destructor. |
| 563 virtual ~PepperPluginInstanceImpl(); | 546 ~PepperPluginInstanceImpl() override; |
| 564 | 547 |
| 565 // Class to record document load notifications and play them back once the | 548 // Class to record document load notifications and play them back once the |
| 566 // real document loader becomes available. Used only by external instances. | 549 // real document loader becomes available. Used only by external instances. |
| 567 class ExternalDocumentLoader : public blink::WebURLLoaderClient { | 550 class ExternalDocumentLoader : public blink::WebURLLoaderClient { |
| 568 public: | 551 public: |
| 569 ExternalDocumentLoader(); | 552 ExternalDocumentLoader(); |
| 570 virtual ~ExternalDocumentLoader(); | 553 virtual ~ExternalDocumentLoader(); |
| 571 | 554 |
| 572 void ReplayReceivedData(WebURLLoaderClient* document_loader); | 555 void ReplayReceivedData(WebURLLoaderClient* document_loader); |
| 573 | 556 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 588 scoped_ptr<blink::WebURLError> error_; | 571 scoped_ptr<blink::WebURLError> error_; |
| 589 }; | 572 }; |
| 590 | 573 |
| 591 // Implements PPB_Gamepad_API. This is just to avoid having an excessive | 574 // Implements PPB_Gamepad_API. This is just to avoid having an excessive |
| 592 // number of interfaces implemented by PepperPluginInstanceImpl. | 575 // number of interfaces implemented by PepperPluginInstanceImpl. |
| 593 class GamepadImpl : public ppapi::thunk::PPB_Gamepad_API, | 576 class GamepadImpl : public ppapi::thunk::PPB_Gamepad_API, |
| 594 public ppapi::Resource { | 577 public ppapi::Resource { |
| 595 public: | 578 public: |
| 596 GamepadImpl(); | 579 GamepadImpl(); |
| 597 // Resource implementation. | 580 // Resource implementation. |
| 598 virtual ppapi::thunk::PPB_Gamepad_API* AsPPB_Gamepad_API() override; | 581 ppapi::thunk::PPB_Gamepad_API* AsPPB_Gamepad_API() override; |
| 599 virtual void Sample(PP_Instance instance, | 582 void Sample(PP_Instance instance, PP_GamepadsSampleData* data) override; |
| 600 PP_GamepadsSampleData* data) override; | |
| 601 | 583 |
| 602 private: | 584 private: |
| 603 virtual ~GamepadImpl(); | 585 ~GamepadImpl() override; |
| 604 }; | 586 }; |
| 605 | 587 |
| 606 // See the static Create functions above for creating PepperPluginInstanceImpl | 588 // See the static Create functions above for creating PepperPluginInstanceImpl |
| 607 // objects. This constructor is private so that we can hide the | 589 // objects. This constructor is private so that we can hide the |
| 608 // PPP_Instance_Combined details while still having 1 constructor to maintain | 590 // PPP_Instance_Combined details while still having 1 constructor to maintain |
| 609 // for member initialization. | 591 // for member initialization. |
| 610 PepperPluginInstanceImpl(RenderFrameImpl* render_frame, | 592 PepperPluginInstanceImpl(RenderFrameImpl* render_frame, |
| 611 PluginModule* module, | 593 PluginModule* module, |
| 612 ppapi::PPP_Instance_Combined* instance_interface, | 594 ppapi::PPP_Instance_Combined* instance_interface, |
| 613 blink::WebPluginContainer* container, | 595 blink::WebPluginContainer* container, |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 // view change events. | 922 // view change events. |
| 941 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 923 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
| 942 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 924 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
| 943 | 925 |
| 944 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 926 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
| 945 }; | 927 }; |
| 946 | 928 |
| 947 } // namespace content | 929 } // namespace content |
| 948 | 930 |
| 949 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 931 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| OLD | NEW |