| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 #include "ppapi/thunk/ppb_gamepad_api.h" | 48 #include "ppapi/thunk/ppb_gamepad_api.h" |
| 49 #include "ppapi/thunk/resource_creation_api.h" | 49 #include "ppapi/thunk/resource_creation_api.h" |
| 50 #include "skia/ext/refptr.h" | 50 #include "skia/ext/refptr.h" |
| 51 #include "third_party/WebKit/public/platform/WebCanvas.h" | 51 #include "third_party/WebKit/public/platform/WebCanvas.h" |
| 52 #include "third_party/WebKit/public/platform/WebString.h" | 52 #include "third_party/WebKit/public/platform/WebString.h" |
| 53 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" | 53 #include "third_party/WebKit/public/platform/WebURLLoaderClient.h" |
| 54 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 54 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 55 #include "third_party/WebKit/public/web/WebPlugin.h" | 55 #include "third_party/WebKit/public/web/WebPlugin.h" |
| 56 #include "third_party/WebKit/public/web/WebUserGestureToken.h" | 56 #include "third_party/WebKit/public/web/WebUserGestureToken.h" |
| 57 #include "ui/base/ime/text_input_type.h" | 57 #include "ui/base/ime/text_input_type.h" |
| 58 #include "ui/events/latency_info.h" |
| 58 #include "ui/gfx/rect.h" | 59 #include "ui/gfx/rect.h" |
| 59 #include "url/gurl.h" | 60 #include "url/gurl.h" |
| 60 | 61 |
| 61 struct PP_Point; | 62 struct PP_Point; |
| 62 struct _NPP; | 63 struct _NPP; |
| 63 | 64 |
| 64 class SkBitmap; | 65 class SkBitmap; |
| 65 class TransportDIB; | 66 class TransportDIB; |
| 66 | 67 |
| 67 namespace blink { | 68 namespace blink { |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) OVERRIDE; | 398 virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) OVERRIDE; |
| 398 virtual ppapi::Resource* GetSingletonResource(PP_Instance instance, | 399 virtual ppapi::Resource* GetSingletonResource(PP_Instance instance, |
| 399 ppapi::SingletonResourceID id) | 400 ppapi::SingletonResourceID id) |
| 400 OVERRIDE; | 401 OVERRIDE; |
| 401 virtual int32_t RequestInputEvents(PP_Instance instance, | 402 virtual int32_t RequestInputEvents(PP_Instance instance, |
| 402 uint32_t event_classes) OVERRIDE; | 403 uint32_t event_classes) OVERRIDE; |
| 403 virtual int32_t RequestFilteringInputEvents(PP_Instance instance, | 404 virtual int32_t RequestFilteringInputEvents(PP_Instance instance, |
| 404 uint32_t event_classes) OVERRIDE; | 405 uint32_t event_classes) OVERRIDE; |
| 405 virtual void ClearInputEventRequest(PP_Instance instance, | 406 virtual void ClearInputEventRequest(PP_Instance instance, |
| 406 uint32_t event_classes) OVERRIDE; | 407 uint32_t event_classes) OVERRIDE; |
| 408 virtual void StartTrackingLatency(PP_Instance instance) OVERRIDE; |
| 407 virtual void ZoomChanged(PP_Instance instance, double factor) OVERRIDE; | 409 virtual void ZoomChanged(PP_Instance instance, double factor) OVERRIDE; |
| 408 virtual void ZoomLimitsChanged(PP_Instance instance, | 410 virtual void ZoomLimitsChanged(PP_Instance instance, |
| 409 double minimum_factor, | 411 double minimum_factor, |
| 410 double maximum_factor) OVERRIDE; | 412 double maximum_factor) OVERRIDE; |
| 411 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE; | 413 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE; |
| 412 virtual PP_Bool SetCursor(PP_Instance instance, | 414 virtual PP_Bool SetCursor(PP_Instance instance, |
| 413 PP_MouseCursor_Type type, | 415 PP_MouseCursor_Type type, |
| 414 PP_Resource image, | 416 PP_Resource image, |
| 415 const PP_Point* hot_spot) OVERRIDE; | 417 const PP_Point* hot_spot) OVERRIDE; |
| 416 virtual int32_t LockMouse(PP_Instance instance, | 418 virtual int32_t LockMouse(PP_Instance instance, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 | 502 |
| 501 // cc::TextureLayerClient implementation. | 503 // cc::TextureLayerClient implementation. |
| 502 virtual bool PrepareTextureMailbox( | 504 virtual bool PrepareTextureMailbox( |
| 503 cc::TextureMailbox* mailbox, | 505 cc::TextureMailbox* mailbox, |
| 504 scoped_ptr<cc::SingleReleaseCallback>* release_callback, | 506 scoped_ptr<cc::SingleReleaseCallback>* release_callback, |
| 505 bool use_shared_memory) OVERRIDE; | 507 bool use_shared_memory) OVERRIDE; |
| 506 | 508 |
| 507 // RenderFrameObserver | 509 // RenderFrameObserver |
| 508 virtual void OnDestruct() OVERRIDE; | 510 virtual void OnDestruct() OVERRIDE; |
| 509 | 511 |
| 512 void AddLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info); |
| 513 |
| 510 private: | 514 private: |
| 511 friend class base::RefCounted<PepperPluginInstanceImpl>; | 515 friend class base::RefCounted<PepperPluginInstanceImpl>; |
| 512 friend class PpapiUnittest; | 516 friend class PpapiUnittest; |
| 513 | 517 |
| 514 // Delete should be called by the WebPlugin before this destructor. | 518 // Delete should be called by the WebPlugin before this destructor. |
| 515 virtual ~PepperPluginInstanceImpl(); | 519 virtual ~PepperPluginInstanceImpl(); |
| 516 | 520 |
| 517 // Class to record document load notifications and play them back once the | 521 // Class to record document load notifications and play them back once the |
| 518 // real document loader becomes available. Used only by external instances. | 522 // real document loader becomes available. Used only by external instances. |
| 519 class ExternalDocumentLoader : public blink::WebURLLoaderClient { | 523 class ExternalDocumentLoader : public blink::WebURLLoaderClient { |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 // Isolate in which this Instance was created when interacting with v8. | 861 // Isolate in which this Instance was created when interacting with v8. |
| 858 v8::Isolate* isolate_; | 862 v8::Isolate* isolate_; |
| 859 | 863 |
| 860 scoped_ptr<MouseLockDispatcher::LockTarget> lock_target_; | 864 scoped_ptr<MouseLockDispatcher::LockTarget> lock_target_; |
| 861 | 865 |
| 862 bool is_deleted_; | 866 bool is_deleted_; |
| 863 | 867 |
| 864 // The text that is currently selected in the plugin. | 868 // The text that is currently selected in the plugin. |
| 865 base::string16 selected_text_; | 869 base::string16 selected_text_; |
| 866 | 870 |
| 871 int64 last_input_number_; |
| 872 |
| 873 bool is_tracking_latency_; |
| 874 |
| 867 // We use a weak ptr factory for scheduling DidChangeView events so that we | 875 // We use a weak ptr factory for scheduling DidChangeView events so that we |
| 868 // can tell whether updates are pending and consolidate them. When there's | 876 // can tell whether updates are pending and consolidate them. When there's |
| 869 // already a weak ptr pending (HasWeakPtrs is true), code should update the | 877 // already a weak ptr pending (HasWeakPtrs is true), code should update the |
| 870 // view_data_ but not send updates. This also allows us to cancel scheduled | 878 // view_data_ but not send updates. This also allows us to cancel scheduled |
| 871 // view change events. | 879 // view change events. |
| 872 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; | 880 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; |
| 873 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; | 881 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; |
| 874 | 882 |
| 875 friend class PpapiPluginInstanceTest; | 883 friend class PpapiPluginInstanceTest; |
| 876 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); | 884 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); |
| 877 }; | 885 }; |
| 878 | 886 |
| 879 } // namespace content | 887 } // namespace content |
| 880 | 888 |
| 881 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ | 889 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ |
| OLD | NEW |