Chromium Code Reviews| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 virtual void connectToWorker(ErrorString*, int workerId) override; | 65 virtual void connectToWorker(ErrorString*, int workerId) override; |
| 66 virtual void disconnectFromWorker(ErrorString*, int workerId) override; | 66 virtual void disconnectFromWorker(ErrorString*, int workerId) override; |
| 67 virtual void sendMessageToWorker(ErrorString*, int workerId, const RefPtr<JS ONObject>& message) override; | 67 virtual void sendMessageToWorker(ErrorString*, int workerId, const RefPtr<JS ONObject>& message) override; |
| 68 virtual void setAutoconnectToWorkers(ErrorString*, bool value) override; | 68 virtual void setAutoconnectToWorkers(ErrorString*, bool value) override; |
| 69 | 69 |
| 70 void setTracingSessionId(const String&); | 70 void setTracingSessionId(const String&); |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 InspectorWorkerAgent(); | 73 InspectorWorkerAgent(); |
| 74 void createWorkerFrontendChannelsForExistingWorkers(); | 74 void createWorkerFrontendChannelsForExistingWorkers(); |
| 75 void createWorkerFrontendChannel(WorkerInspectorProxy*, const String& url); | 75 void createWorkerFrontendChannel(WorkerInspectorProxy*, const String& url, i nt id); |
| 76 void destroyWorkerFrontendChannels(); | 76 void destroyWorkerFrontendChannels(); |
| 77 | 77 |
| 78 InspectorFrontend::Worker* m_frontend; | 78 InspectorFrontend::Worker* m_frontend; |
| 79 | 79 |
| 80 class WorkerInfo { | |
|
yurys
2014/11/17 12:51:36
Please move definition of the class into the .cpp
alph
2014/11/17 13:36:12
I can't. HashMap below has a by-value use.
| |
| 81 public: | |
| 82 WorkerInfo() : id(0) { } | |
| 83 WorkerInfo(const String& url, int id) : url(url), id(id) { } | |
| 84 String url; | |
| 85 int id; | |
| 86 }; | |
| 80 class WorkerFrontendChannel; | 87 class WorkerFrontendChannel; |
| 81 typedef HashMap<int, WorkerFrontendChannel*> WorkerChannels; | 88 typedef HashMap<int, WorkerFrontendChannel*> WorkerChannels; |
| 82 WorkerChannels m_idToChannel; | 89 WorkerChannels m_idToChannel; |
| 83 typedef HashMap<WorkerInspectorProxy*, String> WorkerIds; | 90 typedef HashMap<WorkerInspectorProxy*, WorkerInfo> WorkerInfos; |
| 84 WorkerIds m_workerIds; | 91 WorkerInfos m_workerInfos; |
| 85 String m_tracingSessionId; | 92 String m_tracingSessionId; |
| 93 int m_nextId; | |
| 86 }; | 94 }; |
| 87 | 95 |
| 88 } // namespace blink | 96 } // namespace blink |
| 89 | 97 |
| 90 #endif // !defined(InspectorWorkerAgent_h) | 98 #endif // !defined(InspectorWorkerAgent_h) |
| OLD | NEW |