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

Side by Side Diff: Source/core/workers/DedicatedWorkerGlobalScope.h

Issue 106353005: Expose performance.memory in workers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@Perf-Memory-SharedWorker
Patch Set: Created 6 years, 12 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 | « Source/core/timing/Performance.cpp ('k') | Source/core/workers/DedicatedWorkerGlobalScope.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "core/workers/WorkerGlobalScope.h" 36 #include "core/workers/WorkerGlobalScope.h"
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 class DedicatedWorkerThread; 40 class DedicatedWorkerThread;
41 struct WorkerThreadStartupData; 41 struct WorkerThreadStartupData;
42 42
43 class DedicatedWorkerGlobalScope : public WorkerGlobalScope { 43 class DedicatedWorkerGlobalScope : public WorkerGlobalScope {
44 public: 44 public:
45 typedef WorkerGlobalScope Base; 45 typedef WorkerGlobalScope Base;
46 static PassRefPtr<DedicatedWorkerGlobalScope> create(DedicatedWorkerThread*, PassOwnPtr<WorkerThreadStartupData>, double timeOrigin); 46 static PassRefPtr<DedicatedWorkerGlobalScope> create(DedicatedWorkerThread*, PassOwnPtr<WorkerThreadStartupData>, double timeOrigin, bool memoryInfoEnabled) ;
abarth-chromium 2014/01/07 06:59:16 It's not correct to pass memoryInfoEnabled here.
Pan 2014/01/07 09:30:59 Currently, workers don't have a WorkerSettings obj
47 virtual ~DedicatedWorkerGlobalScope(); 47 virtual ~DedicatedWorkerGlobalScope();
48 48
49 virtual bool isDedicatedWorkerGlobalScope() const OVERRIDE { return true; } 49 virtual bool isDedicatedWorkerGlobalScope() const OVERRIDE { return true; }
50 50
51 // Overridden to allow us to check our pending activity after executing impo rted script. 51 // Overridden to allow us to check our pending activity after executing impo rted script.
52 virtual void importScripts(const Vector<String>& urls, ExceptionState&) OVER RIDE; 52 virtual void importScripts(const Vector<String>& urls, ExceptionState&) OVER RIDE;
53 53
54 // EventTarget 54 // EventTarget
55 virtual const AtomicString& interfaceName() const OVERRIDE; 55 virtual const AtomicString& interfaceName() const OVERRIDE;
56 56
57 void postMessage(PassRefPtr<SerializedScriptValue>, const MessagePortArray*, ExceptionState&); 57 void postMessage(PassRefPtr<SerializedScriptValue>, const MessagePortArray*, ExceptionState&);
58 58
59 DEFINE_ATTRIBUTE_EVENT_LISTENER(message); 59 DEFINE_ATTRIBUTE_EVENT_LISTENER(message);
60 60
61 DedicatedWorkerThread* thread(); 61 DedicatedWorkerThread* thread();
62 62
63 private: 63 private:
64 DedicatedWorkerGlobalScope(const KURL&, const String& userAgent, DedicatedWo rkerThread*, double timeOrigin, PassOwnPtr<WorkerClients>); 64 DedicatedWorkerGlobalScope(const KURL&, const String& userAgent, DedicatedWo rkerThread*, double timeOrigin, bool memoryInfoEnabled, PassOwnPtr<WorkerClients >);
65 }; 65 };
66 66
67 } // namespace WebCore 67 } // namespace WebCore
68 68
69 #endif // DedicatedWorkerGlobalScope_h 69 #endif // DedicatedWorkerGlobalScope_h
OLDNEW
« no previous file with comments | « Source/core/timing/Performance.cpp ('k') | Source/core/workers/DedicatedWorkerGlobalScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698