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

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

Issue 2894063002: Expose UseCounter::Feature enum out of blink as WebFeature (Closed)
Patch Set: Initial check in 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 ThreadedObjectProxyBase_h 5 #ifndef ThreadedObjectProxyBase_h
6 #define ThreadedObjectProxyBase_h 6 #define ThreadedObjectProxyBase_h
7 7
8 #include "bindings/core/v8/SourceLocation.h" 8 #include "bindings/core/v8/SourceLocation.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/dom/MessagePort.h" 10 #include "core/dom/MessagePort.h"
(...skipping 11 matching lines...) Expand all
22 class CORE_EXPORT ThreadedObjectProxyBase : public WorkerReportingProxy { 22 class CORE_EXPORT ThreadedObjectProxyBase : public WorkerReportingProxy {
23 USING_FAST_MALLOC(ThreadedObjectProxyBase); 23 USING_FAST_MALLOC(ThreadedObjectProxyBase);
24 WTF_MAKE_NONCOPYABLE(ThreadedObjectProxyBase); 24 WTF_MAKE_NONCOPYABLE(ThreadedObjectProxyBase);
25 25
26 public: 26 public:
27 ~ThreadedObjectProxyBase() override = default; 27 ~ThreadedObjectProxyBase() override = default;
28 28
29 void ReportPendingActivity(bool has_pending_activity); 29 void ReportPendingActivity(bool has_pending_activity);
30 30
31 // WorkerReportingProxy overrides. 31 // WorkerReportingProxy overrides.
32 // TODO(lunalu): Deprecate UseCounter::Feature by WebFeature.
32 void CountFeature(UseCounter::Feature) override; 33 void CountFeature(UseCounter::Feature) override;
34 void CountFeature(WebFeature feature) override {
35 return CountFeature(static_cast<UseCounter::Feature>(feature));
36 }
33 void CountDeprecation(UseCounter::Feature) override; 37 void CountDeprecation(UseCounter::Feature) override;
38 void CountDeprecation(WebFeature feature) override {
39 return CountDeprecation(static_cast<UseCounter::Feature>(feature));
40 }
34 void ReportConsoleMessage(MessageSource, 41 void ReportConsoleMessage(MessageSource,
35 MessageLevel, 42 MessageLevel,
36 const String& message, 43 const String& message,
37 SourceLocation*) override; 44 SourceLocation*) override;
38 void PostMessageToPageInspector(const String&) override; 45 void PostMessageToPageInspector(const String&) override;
39 void DidCloseWorkerGlobalScope() override; 46 void DidCloseWorkerGlobalScope() override;
40 void DidTerminateWorkerThread() override; 47 void DidTerminateWorkerThread() override;
41 48
42 protected: 49 protected:
43 explicit ThreadedObjectProxyBase(ParentFrameTaskRunners*); 50 explicit ThreadedObjectProxyBase(ParentFrameTaskRunners*);
44 virtual WeakPtr<ThreadedMessagingProxyBase> MessagingProxyWeakPtr() = 0; 51 virtual WeakPtr<ThreadedMessagingProxyBase> MessagingProxyWeakPtr() = 0;
45 ParentFrameTaskRunners* GetParentFrameTaskRunners(); 52 ParentFrameTaskRunners* GetParentFrameTaskRunners();
46 53
47 private: 54 private:
48 // Used to post a task to ThreadedMessagingProxyBase on the parent context 55 // Used to post a task to ThreadedMessagingProxyBase on the parent context
49 // thread. 56 // thread.
50 CrossThreadPersistent<ParentFrameTaskRunners> parent_frame_task_runners_; 57 CrossThreadPersistent<ParentFrameTaskRunners> parent_frame_task_runners_;
51 }; 58 };
52 59
53 } // namespace blink 60 } // namespace blink
54 61
55 #endif // ThreadedObjectProxyBase_h 62 #endif // ThreadedObjectProxyBase_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698