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

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.h

Issue 252663002: Track plugin input event latency (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add ui/events/latency_info_param_traits_macros.h Created 6 years, 7 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 #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
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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 500
500 // cc::TextureLayerClient implementation. 501 // cc::TextureLayerClient implementation.
501 virtual bool PrepareTextureMailbox( 502 virtual bool PrepareTextureMailbox(
502 cc::TextureMailbox* mailbox, 503 cc::TextureMailbox* mailbox,
503 scoped_ptr<cc::SingleReleaseCallback>* release_callback, 504 scoped_ptr<cc::SingleReleaseCallback>* release_callback,
504 bool use_shared_memory) OVERRIDE; 505 bool use_shared_memory) OVERRIDE;
505 506
506 // RenderFrameObserver 507 // RenderFrameObserver
507 virtual void OnDestruct() OVERRIDE; 508 virtual void OnDestruct() OVERRIDE;
508 509
510 void AddLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info);
511
509 private: 512 private:
510 friend class base::RefCounted<PepperPluginInstanceImpl>; 513 friend class base::RefCounted<PepperPluginInstanceImpl>;
511 friend class PpapiUnittest; 514 friend class PpapiUnittest;
512 515
513 // Delete should be called by the WebPlugin before this destructor. 516 // Delete should be called by the WebPlugin before this destructor.
514 virtual ~PepperPluginInstanceImpl(); 517 virtual ~PepperPluginInstanceImpl();
515 518
516 // Class to record document load notifications and play them back once the 519 // Class to record document load notifications and play them back once the
517 // real document loader becomes available. Used only by external instances. 520 // real document loader becomes available. Used only by external instances.
518 class ExternalDocumentLoader : public blink::WebURLLoaderClient { 521 class ExternalDocumentLoader : public blink::WebURLLoaderClient {
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 // Isolate in which this Instance was created when interacting with v8. 862 // Isolate in which this Instance was created when interacting with v8.
860 v8::Isolate* isolate_; 863 v8::Isolate* isolate_;
861 864
862 scoped_ptr<MouseLockDispatcher::LockTarget> lock_target_; 865 scoped_ptr<MouseLockDispatcher::LockTarget> lock_target_;
863 866
864 bool is_deleted_; 867 bool is_deleted_;
865 868
866 // The text that is currently selected in the plugin. 869 // The text that is currently selected in the plugin.
867 base::string16 selected_text_; 870 base::string16 selected_text_;
868 871
872 int64 last_input_number_;
873
869 // We use a weak ptr factory for scheduling DidChangeView events so that we 874 // 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 875 // 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 876 // 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 877 // view_data_ but not send updates. This also allows us to cancel scheduled
873 // view change events. 878 // view change events.
874 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; 879 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_;
875 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; 880 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_;
876 881
877 friend class PpapiPluginInstanceTest; 882 friend class PpapiPluginInstanceTest;
878 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); 883 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl);
879 }; 884 };
880 885
881 } // namespace content 886 } // namespace content
882 887
883 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ 888 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698