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

Side by Side Diff: third_party/WebKit/Source/core/workers/ThreadedWorkletGlobalScope.h

Issue 2857583003: Worker: Avoid sending IPC messages for features already counted (Closed)
Patch Set: wip Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 ThreadedWorkletGlobalScope_h 5 #ifndef ThreadedWorkletGlobalScope_h
6 #define ThreadedWorkletGlobalScope_h 6 #define ThreadedWorkletGlobalScope_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/workers/WorkletGlobalScope.h" 9 #include "core/workers/WorkletGlobalScope.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class WorkerThread; 13 class WorkerThread;
14 14
15 class CORE_EXPORT ThreadedWorkletGlobalScope : public WorkletGlobalScope { 15 class CORE_EXPORT ThreadedWorkletGlobalScope : public WorkletGlobalScope {
16 public: 16 public:
17 ~ThreadedWorkletGlobalScope() override; 17 ~ThreadedWorkletGlobalScope() override;
18 void Dispose() override; 18 void Dispose() override;
19 void CountFeature(UseCounter::Feature) final; 19 void ReportFeature(UseCounter::Feature) override;
20 void CountDeprecation(UseCounter::Feature) final; 20 void ReportDeprecation(UseCounter::Feature) override;
21 21
22 // ExecutionContext 22 // ExecutionContext
23 bool IsThreadedWorkletGlobalScope() const final { return true; } 23 bool IsThreadedWorkletGlobalScope() const final { return true; }
24 bool IsContextThread() const final; 24 bool IsContextThread() const final;
25 void AddConsoleMessage(ConsoleMessage*) final; 25 void AddConsoleMessage(ConsoleMessage*) final;
26 void ExceptionThrown(ErrorEvent*) final; 26 void ExceptionThrown(ErrorEvent*) final;
27 27
28 WorkerThread* GetThread() const { return thread_; } 28 WorkerThread* GetThread() const { return thread_; }
29 29
30 protected: 30 protected:
(...skipping 11 matching lines...) Expand all
42 42
43 DEFINE_TYPE_CASTS(ThreadedWorkletGlobalScope, 43 DEFINE_TYPE_CASTS(ThreadedWorkletGlobalScope,
44 ExecutionContext, 44 ExecutionContext,
45 context, 45 context,
46 context->IsThreadedWorkletGlobalScope(), 46 context->IsThreadedWorkletGlobalScope(),
47 context.IsThreadedWorkletGlobalScope()); 47 context.IsThreadedWorkletGlobalScope());
48 48
49 } // namespace blink 49 } // namespace blink
50 50
51 #endif // ThreadedWorkletGlobalScope_h 51 #endif // ThreadedWorkletGlobalScope_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698