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

Side by Side Diff: Source/core/inspector/InspectorWorkerAgent.cpp

Issue 1232333002: Fix virtual/override/final usage in the rest of Source/core/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorWorkerAgent.h ('k') | Source/core/inspector/PageConsoleAgent.h » ('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) 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 public: 55 public:
56 WorkerAgentClient(InspectorFrontend::Worker* frontend, WorkerInspectorProxy* proxy, const String& id, PageConsoleAgent* consoleAgent) 56 WorkerAgentClient(InspectorFrontend::Worker* frontend, WorkerInspectorProxy* proxy, const String& id, PageConsoleAgent* consoleAgent)
57 : m_frontend(frontend) 57 : m_frontend(frontend)
58 , m_proxy(proxy) 58 , m_proxy(proxy)
59 , m_id(id) 59 , m_id(id)
60 , m_connected(false) 60 , m_connected(false)
61 , m_consoleAgent(consoleAgent) 61 , m_consoleAgent(consoleAgent)
62 { 62 {
63 ASSERT(!proxy->pageInspector()); 63 ASSERT(!proxy->pageInspector());
64 } 64 }
65 virtual ~WorkerAgentClient() 65 ~WorkerAgentClient() override
66 { 66 {
67 disconnectFromWorker(); 67 disconnectFromWorker();
68 } 68 }
69 69
70 String id() const { return m_id; } 70 String id() const { return m_id; }
71 WorkerInspectorProxy* proxy() const { return m_proxy; } 71 WorkerInspectorProxy* proxy() const { return m_proxy; }
72 72
73 void connectToWorker() 73 void connectToWorker()
74 { 74 {
75 if (m_connected) 75 if (m_connected)
76 return; 76 return;
77 m_connected = true; 77 m_connected = true;
78 m_proxy->connectToInspector(this); 78 m_proxy->connectToInspector(this);
79 } 79 }
80 80
81 void disconnectFromWorker() 81 void disconnectFromWorker()
82 { 82 {
83 if (!m_connected) 83 if (!m_connected)
84 return; 84 return;
85 m_connected = false; 85 m_connected = false;
86 m_proxy->disconnectFromInspector(); 86 m_proxy->disconnectFromInspector();
87 } 87 }
88 88
89 private: 89 private:
90 // WorkerInspectorProxy::PageInspector implementation 90 // WorkerInspectorProxy::PageInspector implementation
91 virtual void dispatchMessageFromWorker(const String& message) override 91 void dispatchMessageFromWorker(const String& message) override
92 { 92 {
93 m_frontend->dispatchMessageFromWorker(m_id, message); 93 m_frontend->dispatchMessageFromWorker(m_id, message);
94 } 94 }
95 // WorkerInspectorProxy::PageInspector implementation 95 // WorkerInspectorProxy::PageInspector implementation
96 virtual void workerConsoleAgentEnabled(WorkerGlobalScopeProxy* proxy) overri de 96 void workerConsoleAgentEnabled(WorkerGlobalScopeProxy* proxy) override
97 { 97 {
98 m_consoleAgent->workerConsoleAgentEnabled(proxy); 98 m_consoleAgent->workerConsoleAgentEnabled(proxy);
99 } 99 }
100 100
101 InspectorFrontend::Worker* m_frontend; 101 InspectorFrontend::Worker* m_frontend;
102 WorkerInspectorProxy* m_proxy; 102 WorkerInspectorProxy* m_proxy;
103 String m_id; 103 String m_id;
104 bool m_connected; 104 bool m_connected;
105 PageConsoleAgent* m_consoleAgent; 105 PageConsoleAgent* m_consoleAgent;
106 }; 106 };
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 m_idToClient.set(id, client); 237 m_idToClient.set(id, client);
238 238
239 ASSERT(frontend()); 239 ASSERT(frontend());
240 bool autoconnectToWorkers = m_state->getBoolean(WorkerAgentState::autoconnec tToWorkers); 240 bool autoconnectToWorkers = m_state->getBoolean(WorkerAgentState::autoconnec tToWorkers);
241 if (autoconnectToWorkers) 241 if (autoconnectToWorkers)
242 client->connectToWorker(); 242 client->connectToWorker();
243 frontend()->workerCreated(id, url, autoconnectToWorkers); 243 frontend()->workerCreated(id, url, autoconnectToWorkers);
244 } 244 }
245 245
246 } // namespace blink 246 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorWorkerAgent.h ('k') | Source/core/inspector/PageConsoleAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698