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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 : public base::RefCounted<PepperPluginInstanceImpl>, | 118 : public base::RefCounted<PepperPluginInstanceImpl>, |
119 public NON_EXPORTED_BASE(PepperPluginInstance), | 119 public NON_EXPORTED_BASE(PepperPluginInstance), |
120 public ppapi::PPB_Instance_Shared, | 120 public ppapi::PPB_Instance_Shared, |
121 public NON_EXPORTED_BASE(cc::TextureLayerClient), | 121 public NON_EXPORTED_BASE(cc::TextureLayerClient), |
122 public RenderFrameObserver { | 122 public RenderFrameObserver { |
123 public: | 123 public: |
124 // Create and return a PepperPluginInstanceImpl object which supports the most | 124 // Create and return a PepperPluginInstanceImpl object which supports the most |
125 // recent version of PPP_Instance possible by querying the given | 125 // recent version of PPP_Instance possible by querying the given |
126 // get_plugin_interface function. If the plugin does not support any valid | 126 // get_plugin_interface function. If the plugin does not support any valid |
127 // PPP_Instance interface, returns NULL. | 127 // PPP_Instance interface, returns NULL. |
128 static PepperPluginInstanceImpl* Create( | 128 static PepperPluginInstanceImpl* Create(RenderFrameImpl* render_frame, |
129 RenderFrameImpl* render_frame, | 129 PluginModule* module, |
130 PluginModule* module, | 130 blink::WebPluginContainer* container, |
131 blink::WebPluginContainer* container, | 131 const GURL& plugin_url); |
132 const GURL& plugin_url); | |
133 RenderFrameImpl* render_frame() const { return render_frame_; } | 132 RenderFrameImpl* render_frame() const { return render_frame_; } |
134 PluginModule* module() const { return module_.get(); } | 133 PluginModule* module() const { return module_.get(); } |
135 MessageChannel& message_channel() { return *message_channel_; } | 134 MessageChannel& message_channel() { return *message_channel_; } |
136 | 135 |
137 blink::WebPluginContainer* container() const { return container_; } | 136 blink::WebPluginContainer* container() const { return container_; } |
138 | 137 |
139 // Returns the PP_Instance uniquely identifying this instance. Guaranteed | 138 // Returns the PP_Instance uniquely identifying this instance. Guaranteed |
140 // nonzero. | 139 // nonzero. |
141 PP_Instance pp_instance() const { return pp_instance_; } | 140 PP_Instance pp_instance() const { return pp_instance_; } |
142 | 141 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 const ppapi::ViewData& view_data() const { return view_data_; } | 180 const ppapi::ViewData& view_data() const { return view_data_; } |
182 | 181 |
183 // PPP_Instance and PPP_Instance_Private. | 182 // PPP_Instance and PPP_Instance_Private. |
184 bool Initialize(const std::vector<std::string>& arg_names, | 183 bool Initialize(const std::vector<std::string>& arg_names, |
185 const std::vector<std::string>& arg_values, | 184 const std::vector<std::string>& arg_values, |
186 bool full_frame); | 185 bool full_frame); |
187 bool HandleDocumentLoad(const blink::WebURLResponse& response); | 186 bool HandleDocumentLoad(const blink::WebURLResponse& response); |
188 bool HandleInputEvent(const blink::WebInputEvent& event, | 187 bool HandleInputEvent(const blink::WebInputEvent& event, |
189 blink::WebCursorInfo* cursor_info); | 188 blink::WebCursorInfo* cursor_info); |
190 PP_Var GetInstanceObject(); | 189 PP_Var GetInstanceObject(); |
191 void ViewChanged(const gfx::Rect& position, const gfx::Rect& clip, | 190 void ViewChanged(const gfx::Rect& position, |
| 191 const gfx::Rect& clip, |
192 const std::vector<gfx::Rect>& cut_outs_rects); | 192 const std::vector<gfx::Rect>& cut_outs_rects); |
193 | 193 |
194 // Handlers for composition events. | 194 // Handlers for composition events. |
195 bool HandleCompositionStart(const base::string16& text); | 195 bool HandleCompositionStart(const base::string16& text); |
196 bool HandleCompositionUpdate( | 196 bool HandleCompositionUpdate( |
197 const base::string16& text, | 197 const base::string16& text, |
198 const std::vector<blink::WebCompositionUnderline>& underlines, | 198 const std::vector<blink::WebCompositionUnderline>& underlines, |
199 int selection_start, | 199 int selection_start, |
200 int selection_end); | 200 int selection_end); |
201 bool HandleCompositionEnd(const base::string16& text); | 201 bool HandleCompositionEnd(const base::string16& text); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 // A mouse lock is enabled and mouse events are being delivered. | 314 // A mouse lock is enabled and mouse events are being delivered. |
315 void HandleMouseLockedInputEvent(const blink::WebMouseEvent& event); | 315 void HandleMouseLockedInputEvent(const blink::WebMouseEvent& event); |
316 | 316 |
317 // Simulates an input event to the plugin by passing it down to WebKit, | 317 // Simulates an input event to the plugin by passing it down to WebKit, |
318 // which sends it back up to the plugin as if it came from the user. | 318 // which sends it back up to the plugin as if it came from the user. |
319 void SimulateInputEvent(const ppapi::InputEventData& input_event); | 319 void SimulateInputEvent(const ppapi::InputEventData& input_event); |
320 | 320 |
321 // Simulates an IME event at the level of RenderView which sends it back up to | 321 // Simulates an IME event at the level of RenderView which sends it back up to |
322 // the plugin as if it came from the user. | 322 // the plugin as if it came from the user. |
323 bool SimulateIMEEvent(const ppapi::InputEventData& input_event); | 323 bool SimulateIMEEvent(const ppapi::InputEventData& input_event); |
324 void SimulateImeSetCompositionEvent( | 324 void SimulateImeSetCompositionEvent(const ppapi::InputEventData& input_event); |
325 const ppapi::InputEventData& input_event); | |
326 | 325 |
327 // The document loader is valid when the plugin is "full-frame" and in this | 326 // The document loader is valid when the plugin is "full-frame" and in this |
328 // case is non-NULL as long as the corresponding loader resource is alive. | 327 // case is non-NULL as long as the corresponding loader resource is alive. |
329 // This pointer is non-owning, so the loader must use set_document_loader to | 328 // This pointer is non-owning, so the loader must use set_document_loader to |
330 // clear itself when it is destroyed. | 329 // clear itself when it is destroyed. |
331 blink::WebURLLoaderClient* document_loader() const { | 330 blink::WebURLLoaderClient* document_loader() const { |
332 return document_loader_; | 331 return document_loader_; |
333 } | 332 } |
334 void set_document_loader(blink::WebURLLoaderClient* loader) { | 333 void set_document_loader(blink::WebURLLoaderClient* loader) { |
335 document_loader_ = loader; | 334 document_loader_ = loader; |
(...skipping 16 matching lines...) Expand all Loading... |
352 const IPC::ChannelHandle& channel_handle, | 351 const IPC::ChannelHandle& channel_handle, |
353 base::ProcessId plugin_pid, | 352 base::ProcessId plugin_pid, |
354 int plugin_child_id) OVERRIDE; | 353 int plugin_child_id) OVERRIDE; |
355 virtual void SetAlwaysOnTop(bool on_top) OVERRIDE; | 354 virtual void SetAlwaysOnTop(bool on_top) OVERRIDE; |
356 virtual bool IsFullPagePlugin() OVERRIDE; | 355 virtual bool IsFullPagePlugin() OVERRIDE; |
357 virtual bool FlashSetFullscreen(bool fullscreen, bool delay_report) OVERRIDE; | 356 virtual bool FlashSetFullscreen(bool fullscreen, bool delay_report) OVERRIDE; |
358 virtual bool IsRectTopmost(const gfx::Rect& rect) OVERRIDE; | 357 virtual bool IsRectTopmost(const gfx::Rect& rect) OVERRIDE; |
359 virtual int32_t Navigate(const ppapi::URLRequestInfoData& request, | 358 virtual int32_t Navigate(const ppapi::URLRequestInfoData& request, |
360 const char* target, | 359 const char* target, |
361 bool from_user_action) OVERRIDE; | 360 bool from_user_action) OVERRIDE; |
362 virtual int MakePendingFileRefRendererHost( | 361 virtual int MakePendingFileRefRendererHost(const base::FilePath& path) |
363 const base::FilePath& path) OVERRIDE; | 362 OVERRIDE; |
364 virtual void SetEmbedProperty(PP_Var key, PP_Var value) OVERRIDE; | 363 virtual void SetEmbedProperty(PP_Var key, PP_Var value) OVERRIDE; |
365 virtual void SetSelectedText(const base::string16& selected_text) OVERRIDE; | 364 virtual void SetSelectedText(const base::string16& selected_text) OVERRIDE; |
366 virtual void SetLinkUnderCursor(const std::string& url) OVERRIDE; | 365 virtual void SetLinkUnderCursor(const std::string& url) OVERRIDE; |
367 | 366 |
368 // PPB_Instance_API implementation. | 367 // PPB_Instance_API implementation. |
369 virtual PP_Bool BindGraphics(PP_Instance instance, | 368 virtual PP_Bool BindGraphics(PP_Instance instance, |
370 PP_Resource device) OVERRIDE; | 369 PP_Resource device) OVERRIDE; |
371 virtual PP_Bool IsFullFrame(PP_Instance instance) OVERRIDE; | 370 virtual PP_Bool IsFullFrame(PP_Instance instance) OVERRIDE; |
372 virtual const ppapi::ViewData* GetViewData(PP_Instance instance) OVERRIDE; | 371 virtual const ppapi::ViewData* GetViewData(PP_Instance instance) OVERRIDE; |
373 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE; | 372 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE; |
(...skipping 12 matching lines...) Expand all Loading... |
386 int32_t total, | 385 int32_t total, |
387 PP_Bool final_result) OVERRIDE; | 386 PP_Bool final_result) OVERRIDE; |
388 virtual void SelectedFindResultChanged(PP_Instance instance, | 387 virtual void SelectedFindResultChanged(PP_Instance instance, |
389 int32_t index) OVERRIDE; | 388 int32_t index) OVERRIDE; |
390 virtual void SetTickmarks(PP_Instance instance, | 389 virtual void SetTickmarks(PP_Instance instance, |
391 const PP_Rect* tickmarks, | 390 const PP_Rect* tickmarks, |
392 uint32_t count) OVERRIDE; | 391 uint32_t count) OVERRIDE; |
393 virtual PP_Bool IsFullscreen(PP_Instance instance) OVERRIDE; | 392 virtual PP_Bool IsFullscreen(PP_Instance instance) OVERRIDE; |
394 virtual PP_Bool SetFullscreen(PP_Instance instance, | 393 virtual PP_Bool SetFullscreen(PP_Instance instance, |
395 PP_Bool fullscreen) OVERRIDE; | 394 PP_Bool fullscreen) OVERRIDE; |
396 virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) | 395 virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) OVERRIDE; |
| 396 virtual ppapi::Resource* GetSingletonResource(PP_Instance instance, |
| 397 ppapi::SingletonResourceID id) |
397 OVERRIDE; | 398 OVERRIDE; |
398 virtual ppapi::Resource* GetSingletonResource(PP_Instance instance, | |
399 ppapi::SingletonResourceID id) OVERRIDE; | |
400 virtual int32_t RequestInputEvents(PP_Instance instance, | 399 virtual int32_t RequestInputEvents(PP_Instance instance, |
401 uint32_t event_classes) OVERRIDE; | 400 uint32_t event_classes) OVERRIDE; |
402 virtual int32_t RequestFilteringInputEvents(PP_Instance instance, | 401 virtual int32_t RequestFilteringInputEvents(PP_Instance instance, |
403 uint32_t event_classes) OVERRIDE; | 402 uint32_t event_classes) OVERRIDE; |
404 virtual void ClearInputEventRequest(PP_Instance instance, | 403 virtual void ClearInputEventRequest(PP_Instance instance, |
405 uint32_t event_classes) OVERRIDE; | 404 uint32_t event_classes) OVERRIDE; |
406 virtual void ZoomChanged(PP_Instance instance, double factor) OVERRIDE; | 405 virtual void ZoomChanged(PP_Instance instance, double factor) OVERRIDE; |
407 virtual void ZoomLimitsChanged(PP_Instance instance, | 406 virtual void ZoomLimitsChanged(PP_Instance instance, |
408 double minimum_factor, | 407 double minimum_factor, |
409 double maximum_factor) OVERRIDE; | 408 double maximum_factor) OVERRIDE; |
410 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE; | 409 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE; |
411 virtual PP_Bool SetCursor(PP_Instance instance, | 410 virtual PP_Bool SetCursor(PP_Instance instance, |
412 PP_MouseCursor_Type type, | 411 PP_MouseCursor_Type type, |
413 PP_Resource image, | 412 PP_Resource image, |
414 const PP_Point* hot_spot) OVERRIDE; | 413 const PP_Point* hot_spot) OVERRIDE; |
415 virtual int32_t LockMouse( | 414 virtual int32_t LockMouse(PP_Instance instance, |
416 PP_Instance instance, | 415 scoped_refptr<ppapi::TrackedCallback> callback) |
417 scoped_refptr<ppapi::TrackedCallback> callback) OVERRIDE; | 416 OVERRIDE; |
418 virtual void UnlockMouse(PP_Instance instance) OVERRIDE; | 417 virtual void UnlockMouse(PP_Instance instance) OVERRIDE; |
419 virtual void SetTextInputType(PP_Instance instance, | 418 virtual void SetTextInputType(PP_Instance instance, |
420 PP_TextInput_Type type) OVERRIDE; | 419 PP_TextInput_Type type) OVERRIDE; |
421 virtual void UpdateCaretPosition(PP_Instance instance, | 420 virtual void UpdateCaretPosition(PP_Instance instance, |
422 const PP_Rect& caret, | 421 const PP_Rect& caret, |
423 const PP_Rect& bounding_box) OVERRIDE; | 422 const PP_Rect& bounding_box) OVERRIDE; |
424 virtual void CancelCompositionText(PP_Instance instance) OVERRIDE; | 423 virtual void CancelCompositionText(PP_Instance instance) OVERRIDE; |
425 virtual void SelectionChanged(PP_Instance instance) OVERRIDE; | 424 virtual void SelectionChanged(PP_Instance instance) OVERRIDE; |
426 virtual void UpdateSurroundingText(PP_Instance instance, | 425 virtual void UpdateSurroundingText(PP_Instance instance, |
427 const char* text, | 426 const char* text, |
428 uint32_t caret, | 427 uint32_t caret, |
429 uint32_t anchor) OVERRIDE; | 428 uint32_t anchor) OVERRIDE; |
430 virtual PP_Var ResolveRelativeToDocument( | 429 virtual PP_Var ResolveRelativeToDocument(PP_Instance instance, |
431 PP_Instance instance, | 430 PP_Var relative, |
432 PP_Var relative, | 431 PP_URLComponents_Dev* components) |
433 PP_URLComponents_Dev* components) OVERRIDE; | 432 OVERRIDE; |
434 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE; | 433 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE; |
435 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, | 434 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, |
436 PP_Instance target) OVERRIDE; | 435 PP_Instance target) OVERRIDE; |
437 virtual PP_Var GetDocumentURL(PP_Instance instance, | 436 virtual PP_Var GetDocumentURL(PP_Instance instance, |
438 PP_URLComponents_Dev* components) OVERRIDE; | 437 PP_URLComponents_Dev* components) OVERRIDE; |
439 virtual PP_Var GetPluginInstanceURL( | 438 virtual PP_Var GetPluginInstanceURL(PP_Instance instance, |
440 PP_Instance instance, | 439 PP_URLComponents_Dev* components) |
441 PP_URLComponents_Dev* components) OVERRIDE; | 440 OVERRIDE; |
442 virtual PP_Var GetPluginReferrerURL( | 441 virtual PP_Var GetPluginReferrerURL(PP_Instance instance, |
443 PP_Instance instance, | 442 PP_URLComponents_Dev* components) |
444 PP_URLComponents_Dev* components) OVERRIDE; | 443 OVERRIDE; |
445 | 444 |
446 // PPB_ContentDecryptor_Private implementation. | 445 // PPB_ContentDecryptor_Private implementation. |
447 virtual void SessionCreated(PP_Instance instance, | 446 virtual void SessionCreated(PP_Instance instance, |
448 uint32_t session_id, | 447 uint32_t session_id, |
449 PP_Var web_session_id_var) OVERRIDE; | 448 PP_Var web_session_id_var) OVERRIDE; |
450 virtual void SessionMessage(PP_Instance instance, | 449 virtual void SessionMessage(PP_Instance instance, |
451 uint32_t session_id, | 450 uint32_t session_id, |
452 PP_Var message, | 451 PP_Var message, |
453 PP_Var destination_url) OVERRIDE; | 452 PP_Var destination_url) OVERRIDE; |
454 virtual void SessionReady(PP_Instance instance, uint32_t session_id) OVERRIDE; | 453 virtual void SessionReady(PP_Instance instance, uint32_t session_id) OVERRIDE; |
(...skipping 12 matching lines...) Expand all Loading... |
467 PP_Bool success) OVERRIDE; | 466 PP_Bool success) OVERRIDE; |
468 virtual void DecoderDeinitializeDone(PP_Instance instance, | 467 virtual void DecoderDeinitializeDone(PP_Instance instance, |
469 PP_DecryptorStreamType decoder_type, | 468 PP_DecryptorStreamType decoder_type, |
470 uint32_t request_id) OVERRIDE; | 469 uint32_t request_id) OVERRIDE; |
471 virtual void DecoderResetDone(PP_Instance instance, | 470 virtual void DecoderResetDone(PP_Instance instance, |
472 PP_DecryptorStreamType decoder_type, | 471 PP_DecryptorStreamType decoder_type, |
473 uint32_t request_id) OVERRIDE; | 472 uint32_t request_id) OVERRIDE; |
474 virtual void DeliverFrame(PP_Instance instance, | 473 virtual void DeliverFrame(PP_Instance instance, |
475 PP_Resource decrypted_frame, | 474 PP_Resource decrypted_frame, |
476 const PP_DecryptedFrameInfo* frame_info) OVERRIDE; | 475 const PP_DecryptedFrameInfo* frame_info) OVERRIDE; |
477 virtual void DeliverSamples( | 476 virtual void DeliverSamples(PP_Instance instance, |
478 PP_Instance instance, | 477 PP_Resource audio_frames, |
479 PP_Resource audio_frames, | 478 const PP_DecryptedSampleInfo* sample_info) |
480 const PP_DecryptedSampleInfo* sample_info) OVERRIDE; | 479 OVERRIDE; |
481 | 480 |
482 // Reset this instance as proxied. Assigns the instance a new module, resets | 481 // Reset this instance as proxied. Assigns the instance a new module, resets |
483 // cached interfaces to point to the out-of-process proxy and re-sends | 482 // cached interfaces to point to the out-of-process proxy and re-sends |
484 // DidCreate, DidChangeView, and HandleDocumentLoad (if necessary). | 483 // DidCreate, DidChangeView, and HandleDocumentLoad (if necessary). |
485 // This should be used only when switching an in-process instance to an | 484 // This should be used only when switching an in-process instance to an |
486 // external out-of-process instance. | 485 // external out-of-process instance. |
487 PP_ExternalPluginResult ResetAsProxied(scoped_refptr<PluginModule> module); | 486 PP_ExternalPluginResult ResetAsProxied(scoped_refptr<PluginModule> module); |
488 | 487 |
489 // Checks whether this is a valid instance of the given module. After calling | 488 // Checks whether this is a valid instance of the given module. After calling |
490 // ResetAsProxied above, a NaCl plugin instance's module changes, so external | 489 // ResetAsProxied above, a NaCl plugin instance's module changes, so external |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 // Implements PPB_Gamepad_API. This is just to avoid having an excessive | 541 // Implements PPB_Gamepad_API. This is just to avoid having an excessive |
543 // number of interfaces implemented by PepperPluginInstanceImpl. | 542 // number of interfaces implemented by PepperPluginInstanceImpl. |
544 class GamepadImpl : public ppapi::thunk::PPB_Gamepad_API, | 543 class GamepadImpl : public ppapi::thunk::PPB_Gamepad_API, |
545 public ppapi::Resource { | 544 public ppapi::Resource { |
546 public: | 545 public: |
547 GamepadImpl(); | 546 GamepadImpl(); |
548 // Resource implementation. | 547 // Resource implementation. |
549 virtual ppapi::thunk::PPB_Gamepad_API* AsPPB_Gamepad_API() OVERRIDE; | 548 virtual ppapi::thunk::PPB_Gamepad_API* AsPPB_Gamepad_API() OVERRIDE; |
550 virtual void Sample(PP_Instance instance, | 549 virtual void Sample(PP_Instance instance, |
551 PP_GamepadsSampleData* data) OVERRIDE; | 550 PP_GamepadsSampleData* data) OVERRIDE; |
| 551 |
552 private: | 552 private: |
553 virtual ~GamepadImpl(); | 553 virtual ~GamepadImpl(); |
554 }; | 554 }; |
555 | 555 |
556 // See the static Create functions above for creating PepperPluginInstanceImpl | 556 // See the static Create functions above for creating PepperPluginInstanceImpl |
557 // objects. This constructor is private so that we can hide the | 557 // objects. This constructor is private so that we can hide the |
558 // PPP_Instance_Combined details while still having 1 constructor to maintain | 558 // PPP_Instance_Combined details while still having 1 constructor to maintain |
559 // for member initialization. | 559 // for member initialization. |
560 PepperPluginInstanceImpl(RenderFrameImpl* render_frame, | 560 PepperPluginInstanceImpl(RenderFrameImpl* render_frame, |
561 PluginModule* module, | 561 PluginModule* module, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 void UpdateLayer(); | 611 void UpdateLayer(); |
612 | 612 |
613 // Internal helper function for PrintPage(). | 613 // Internal helper function for PrintPage(). |
614 bool PrintPageHelper(PP_PrintPageNumberRange_Dev* page_ranges, | 614 bool PrintPageHelper(PP_PrintPageNumberRange_Dev* page_ranges, |
615 int num_ranges, | 615 int num_ranges, |
616 blink::WebCanvas* canvas); | 616 blink::WebCanvas* canvas); |
617 | 617 |
618 void DoSetCursor(blink::WebCursorInfo* cursor); | 618 void DoSetCursor(blink::WebCursorInfo* cursor); |
619 | 619 |
620 // Internal helper functions for HandleCompositionXXX(). | 620 // Internal helper functions for HandleCompositionXXX(). |
621 bool SendCompositionEventToPlugin( | 621 bool SendCompositionEventToPlugin(PP_InputEvent_Type type, |
622 PP_InputEvent_Type type, | 622 const base::string16& text); |
623 const base::string16& text); | |
624 bool SendCompositionEventWithUnderlineInformationToPlugin( | 623 bool SendCompositionEventWithUnderlineInformationToPlugin( |
625 PP_InputEvent_Type type, | 624 PP_InputEvent_Type type, |
626 const base::string16& text, | 625 const base::string16& text, |
627 const std::vector<blink::WebCompositionUnderline>& underlines, | 626 const std::vector<blink::WebCompositionUnderline>& underlines, |
628 int selection_start, | 627 int selection_start, |
629 int selection_end); | 628 int selection_end); |
630 | 629 |
631 // Internal helper function for XXXInputEvents(). | 630 // Internal helper function for XXXInputEvents(). |
632 void RequestInputEventsHelper(uint32_t event_classes); | 631 void RequestInputEventsHelper(uint32_t event_classes); |
633 | 632 |
(...skipping 10 matching lines...) Expand all Loading... |
644 void KeepSizeAttributesBeforeFullscreen(); | 643 void KeepSizeAttributesBeforeFullscreen(); |
645 void SetSizeAttributesForFullscreen(); | 644 void SetSizeAttributesForFullscreen(); |
646 void ResetSizeAttributesAfterFullscreen(); | 645 void ResetSizeAttributesAfterFullscreen(); |
647 | 646 |
648 bool IsMouseLocked(); | 647 bool IsMouseLocked(); |
649 bool LockMouse(); | 648 bool LockMouse(); |
650 MouseLockDispatcher* GetMouseLockDispatcher(); | 649 MouseLockDispatcher* GetMouseLockDispatcher(); |
651 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter(); | 650 MouseLockDispatcher::LockTarget* GetOrCreateLockTargetAdapter(); |
652 void UnSetAndDeleteLockTargetAdapter(); | 651 void UnSetAndDeleteLockTargetAdapter(); |
653 | 652 |
654 void DidDataFromWebURLResponse( | 653 void DidDataFromWebURLResponse(const blink::WebURLResponse& response, |
655 const blink::WebURLResponse& response, | 654 int pending_host_id, |
656 int pending_host_id, | 655 const ppapi::URLResponseInfoData& data); |
657 const ppapi::URLResponseInfoData& data); | |
658 | 656 |
659 RenderFrameImpl* render_frame_; | 657 RenderFrameImpl* render_frame_; |
660 base::Closure instance_deleted_callback_; | 658 base::Closure instance_deleted_callback_; |
661 scoped_refptr<PluginModule> module_; | 659 scoped_refptr<PluginModule> module_; |
662 scoped_ptr<ppapi::PPP_Instance_Combined> instance_interface_; | 660 scoped_ptr<ppapi::PPP_Instance_Combined> instance_interface_; |
663 // If this is the NaCl plugin, we create a new module when we switch to the | 661 // If this is the NaCl plugin, we create a new module when we switch to the |
664 // IPC-based PPAPI proxy. Store the original module and instance interface | 662 // IPC-based PPAPI proxy. Store the original module and instance interface |
665 // so we can shut down properly. | 663 // so we can shut down properly. |
666 scoped_refptr<PluginModule> original_module_; | 664 scoped_refptr<PluginModule> original_module_; |
667 scoped_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; | 665 scoped_ptr<ppapi::PPP_Instance_Combined> original_instance_interface_; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 873 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
876 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 874 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
877 | 875 |
878 friend class PpapiPluginInstanceTest; | 876 friend class PpapiPluginInstanceTest; |
879 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 877 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
880 }; | 878 }; |
881 | 879 |
882 } // namespace content | 880 } // namespace content |
883 | 881 |
884 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 882 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
OLD | NEW |