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

Side by Side Diff: ppapi/shared_impl/ppapi_globals.cc

Issue 252663002: Track plugin input event latency (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix win & mac build 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
« no previous file with comments | « ppapi/shared_impl/ppapi_globals.h ('k') | ppapi/shared_impl/ppb_input_event_shared.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ppapi/shared_impl/ppapi_globals.h" 5 #include "ppapi/shared_impl/ppapi_globals.h"
6 6
7 #include "base/lazy_instance.h" // For testing purposes only. 7 #include "base/lazy_instance.h" // For testing purposes only.
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/threading/thread_local.h" // For testing purposes only. 10 #include "base/threading/thread_local.h" // For testing purposes only.
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void PpapiGlobals::ResetMainThreadMessageLoopForTesting() { 60 void PpapiGlobals::ResetMainThreadMessageLoopForTesting() {
61 main_loop_proxy_ = base::MessageLoopProxy::current(); 61 main_loop_proxy_ = base::MessageLoopProxy::current();
62 } 62 }
63 63
64 bool PpapiGlobals::IsHostGlobals() const { return false; } 64 bool PpapiGlobals::IsHostGlobals() const { return false; }
65 65
66 bool PpapiGlobals::IsPluginGlobals() const { return false; } 66 bool PpapiGlobals::IsPluginGlobals() const { return false; }
67 67
68 void PpapiGlobals::MarkPluginIsActive() {} 68 void PpapiGlobals::MarkPluginIsActive() {}
69 69
70 void PpapiGlobals::AddLatencyInfo(const ui::LatencyInfo& latency_info,
71 PP_Instance instance) {
72 latency_info_for_frame_[instance].push_back(latency_info);
73 }
74
75 void PpapiGlobals::TransferLatencyInfoTo(
76 std::vector<ui::LatencyInfo>* latency_info, PP_Instance instance) {
77 latency_info->swap(latency_info_for_frame_[instance]);
78 latency_info_for_frame_.erase(instance);
79 }
80
70 // static 81 // static
71 PpapiGlobals* PpapiGlobals::GetThreadLocalPointer() { 82 PpapiGlobals* PpapiGlobals::GetThreadLocalPointer() {
72 return tls_ppapi_globals_for_test.Pointer()->Get(); 83 return tls_ppapi_globals_for_test.Pointer()->Get();
73 } 84 }
74 85
75 } // namespace ppapi 86 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppapi_globals.h ('k') | ppapi/shared_impl/ppb_input_event_shared.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698