OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #include "core/inspector/WorkerRuntimeAgent.h" | 49 #include "core/inspector/WorkerRuntimeAgent.h" |
50 #include "core/workers/WorkerGlobalScope.h" | 50 #include "core/workers/WorkerGlobalScope.h" |
51 #include "core/workers/WorkerReportingProxy.h" | 51 #include "core/workers/WorkerReportingProxy.h" |
52 #include "core/workers/WorkerThread.h" | 52 #include "core/workers/WorkerThread.h" |
53 #include "wtf/PassOwnPtr.h" | 53 #include "wtf/PassOwnPtr.h" |
54 | 54 |
55 namespace WebCore { | 55 namespace WebCore { |
56 | 56 |
57 namespace { | 57 namespace { |
58 | 58 |
59 class PageInspectorProxy : public InspectorFrontendChannel { | 59 class PageInspectorProxy FINAL : public InspectorFrontendChannel { |
60 WTF_MAKE_FAST_ALLOCATED; | 60 WTF_MAKE_FAST_ALLOCATED; |
61 public: | 61 public: |
62 explicit PageInspectorProxy(WorkerGlobalScope* workerGlobalScope) : m_worker
GlobalScope(workerGlobalScope) { } | 62 explicit PageInspectorProxy(WorkerGlobalScope* workerGlobalScope) : m_worker
GlobalScope(workerGlobalScope) { } |
63 virtual ~PageInspectorProxy() { } | 63 virtual ~PageInspectorProxy() { } |
64 private: | 64 private: |
65 virtual bool sendMessageToFrontend(const String& message) | 65 virtual bool sendMessageToFrontend(const String& message) OVERRIDE |
66 { | 66 { |
67 m_workerGlobalScope->thread()->workerReportingProxy().postMessageToPageI
nspector(message); | 67 m_workerGlobalScope->thread()->workerReportingProxy().postMessageToPageI
nspector(message); |
68 return true; | 68 return true; |
69 } | 69 } |
70 WorkerGlobalScope* m_workerGlobalScope; | 70 WorkerGlobalScope* m_workerGlobalScope; |
71 }; | 71 }; |
72 | 72 |
73 class WorkerStateClient : public InspectorStateClient { | 73 class WorkerStateClient FINAL : public InspectorStateClient { |
74 WTF_MAKE_FAST_ALLOCATED; | 74 WTF_MAKE_FAST_ALLOCATED; |
75 public: | 75 public: |
76 WorkerStateClient(WorkerGlobalScope* context) : m_workerGlobalScope(context)
{ } | 76 WorkerStateClient(WorkerGlobalScope* context) : m_workerGlobalScope(context)
{ } |
77 virtual ~WorkerStateClient() { } | 77 virtual ~WorkerStateClient() { } |
78 | 78 |
79 private: | 79 private: |
80 virtual void updateInspectorStateCookie(const String& cookie) | 80 virtual void updateInspectorStateCookie(const String& cookie) OVERRIDE |
81 { | 81 { |
82 m_workerGlobalScope->thread()->workerReportingProxy().updateInspectorSta
teCookie(cookie); | 82 m_workerGlobalScope->thread()->workerReportingProxy().updateInspectorSta
teCookie(cookie); |
83 } | 83 } |
84 | 84 |
85 WorkerGlobalScope* m_workerGlobalScope; | 85 WorkerGlobalScope* m_workerGlobalScope; |
86 }; | 86 }; |
87 | 87 |
88 } | 88 } |
89 | 89 |
90 WorkerInspectorController::WorkerInspectorController(WorkerGlobalScope* workerGl
obalScope) | 90 WorkerInspectorController::WorkerInspectorController(WorkerGlobalScope* workerGl
obalScope) |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 void WorkerInspectorController::resume() | 157 void WorkerInspectorController::resume() |
158 { | 158 { |
159 if (WorkerRuntimeAgent* runtimeAgent = m_instrumentingAgents->workerRuntimeA
gent()) { | 159 if (WorkerRuntimeAgent* runtimeAgent = m_instrumentingAgents->workerRuntimeA
gent()) { |
160 ErrorString unused; | 160 ErrorString unused; |
161 runtimeAgent->run(&unused); | 161 runtimeAgent->run(&unused); |
162 } | 162 } |
163 } | 163 } |
164 | 164 |
165 } | 165 } |
OLD | NEW |