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

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

Issue 16434011: Support performance.now() in workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix WorkerPerformance IDL Created 7 years, 6 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
Index: Source/modules/performance/WorkerContextPerformance.h
diff --git a/Source/modules/donottrack/NavigatorDoNotTrack.h b/Source/modules/performance/WorkerContextPerformance.h
similarity index 74%
copy from Source/modules/donottrack/NavigatorDoNotTrack.h
copy to Source/modules/performance/WorkerContextPerformance.h
index 0c044e7cd8edef2f8860c374d59f077e1e963816..d6f2769a32c90b1b0697533f37915e3864029c39 100644
--- a/Source/modules/donottrack/NavigatorDoNotTrack.h
+++ b/Source/modules/performance/WorkerContextPerformance.h
@@ -28,32 +28,33 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef NavigatorDoNotTrack_h
-#define NavigatorDoNotTrack_h
+#ifndef WorkerContextPerformance_h
+#define WorkerContextPerformance_h
-#include "core/page/DOMWindowProperty.h"
#include "core/platform/Supplementable.h"
-#include "wtf/text/WTFString.h"
namespace WebCore {
-class Frame;
-class Navigator;
+class ScriptExecutionContext;
+class WorkerPerformance;
-class NavigatorDoNotTrack : public Supplement<Navigator>, public DOMWindowProperty {
+class WorkerContextPerformance : public Supplement<ScriptExecutionContext> {
public:
- virtual ~NavigatorDoNotTrack();
- static NavigatorDoNotTrack* from(Navigator*);
+ virtual ~WorkerContextPerformance();
+ static WorkerContextPerformance* from(ScriptExecutionContext*);
- static String doNotTrack(Navigator*);
-
- String doNotTrack();
+ static WorkerPerformance* performance(ScriptExecutionContext*);
private:
- explicit NavigatorDoNotTrack(Frame*);
+ WorkerContextPerformance(ScriptExecutionContext*);
abarth-chromium 2013/06/12 23:11:41 Please mark one-argument constructors "explicit"
James Simonsen 2013/06/13 00:01:36 Done.
+
+ WorkerPerformance* performance();
static const char* supplementName();
+
+ RefPtr<WorkerPerformance> m_performance;
+ ScriptExecutionContext* m_context;
};
} // namespace WebCore
-#endif // NavigatorDoNotTrack_h
+#endif // WorkerContextPerformance_h

Powered by Google App Engine
This is Rietveld 408576698