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