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

Side by Side Diff: third_party/WebKit/Source/modules/exported/WebEmbeddedWorkerImpl.cpp

Issue 2951833002: [DevTools] Support multiple sessions in dedicated workers (Closed)
Patch Set: Created 3 years, 6 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 return; 254 return;
255 } 255 }
256 256
257 main_frame_->GetFrame()->GetDocument()->AddConsoleMessage( 257 main_frame_->GetFrame()->GetDocument()->AddConsoleMessage(
258 ConsoleMessage::Create( 258 ConsoleMessage::Create(
259 kOtherMessageSource, web_core_message_level, message.text, 259 kOtherMessageSource, web_core_message_level, message.text,
260 SourceLocation::Create(message.url, message.line_number, 260 SourceLocation::Create(message.url, message.line_number,
261 message.column_number, nullptr))); 261 message.column_number, nullptr)));
262 } 262 }
263 263
264 void WebEmbeddedWorkerImpl::PostMessageToPageInspector(const String& message) { 264 void WebEmbeddedWorkerImpl::PostMessageToPageInspector(int session_id,
265 worker_inspector_proxy_->DispatchMessageFromWorker(message); 265 const String& message) {
266 worker_inspector_proxy_->DispatchMessageFromWorker(session_id, message);
266 } 267 }
267 268
268 void WebEmbeddedWorkerImpl::PrepareShadowPageForLoader() { 269 void WebEmbeddedWorkerImpl::PrepareShadowPageForLoader() {
269 // Create 'shadow page', which is never displayed and is used mainly to 270 // Create 'shadow page', which is never displayed and is used mainly to
270 // provide a context for loading on the main thread. 271 // provide a context for loading on the main thread.
271 // 272 //
272 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader. 273 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader.
273 // This code, and probably most of the code in this class should be shared 274 // This code, and probably most of the code in this class should be shared
274 // with SharedWorker. 275 // with SharedWorker.
275 DCHECK(!web_view_); 276 DCHECK(!web_view_);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 // populate the task runners with null document not to confuse the frame 473 // populate the task runners with null document not to confuse the frame
473 // scheduler (which will end up using the thread's default task runner). 474 // scheduler (which will end up using the thread's default task runner).
474 worker_thread_->Start(std::move(startup_data), 475 worker_thread_->Start(std::move(startup_data),
475 ParentFrameTaskRunners::Create(nullptr)); 476 ParentFrameTaskRunners::Create(nullptr));
476 477
477 worker_inspector_proxy_->WorkerThreadCreated(document, worker_thread_.get(), 478 worker_inspector_proxy_->WorkerThreadCreated(document, worker_thread_.get(),
478 script_url); 479 script_url);
479 } 480 }
480 481
481 } // namespace blink 482 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698