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

Unified Diff: Source/modules/performance/SharedWorkerPerformance.h

Issue 111743007: Add the SharedWorker.workerStart property for high resolution timers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code style compliance Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/performance/SharedWorkerPerformance.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/performance/SharedWorkerPerformance.h
diff --git a/Source/platform/LengthPoint.h b/Source/modules/performance/SharedWorkerPerformance.h
similarity index 70%
copy from Source/platform/LengthPoint.h
copy to Source/modules/performance/SharedWorkerPerformance.h
index 75497a1dcc3447a9f6d0598f6e67c4ef7eb9cc6d..b7afd473897d1a654859e505fdfc2a675d33885f 100644
--- a/Source/platform/LengthPoint.h
+++ b/Source/modules/performance/SharedWorkerPerformance.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Opera Software ASA. All rights reserved.
+ * Copyright (c) 2014, Opera Software ASA. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,39 +27,31 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef LengthPoint_h
-#define LengthPoint_h
+#ifndef SharedWorkerPerformance_h
+#define SharedWorkerPerformance_h
-#include "platform/Length.h"
+#include "platform/Supplementable.h"
namespace WebCore {
-struct LengthPoint {
-public:
- LengthPoint()
- {
- }
-
- LengthPoint(Length x, Length y)
- : m_x(x)
- , m_y(y)
- {
- }
-
- bool operator==(const LengthPoint& o) const { return m_x == o.m_x && m_y == o.m_y; }
- bool operator!=(const LengthPoint& o) const { return m_x != o.m_x || m_y != o.m_y; }
+class ExecutionContext;
+class SharedWorker;
- void setX(Length x) { m_x = x; }
- Length x() const { return m_x; }
+class SharedWorkerPerformance : public Supplement<SharedWorker> {
+public:
+ virtual ~SharedWorkerPerformance();
+ static SharedWorkerPerformance* from(SharedWorker*);
- void setY(Length y) { m_y = y; }
- Length y() const { return m_y; }
+ static double workerStart(ExecutionContext*, SharedWorker*);
+ double getWorkerStart(ExecutionContext*, SharedWorker*) const;
private:
- Length m_x;
- Length m_y;
+ explicit SharedWorkerPerformance();
+ static const char* supplementName();
+
+ double m_timeOrigin;
};
} // namespace WebCore
-#endif // LengthPoint_h
+#endif // SharedWorkerPerformance_h
« no previous file with comments | « Source/modules/modules.gypi ('k') | Source/modules/performance/SharedWorkerPerformance.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698