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

Side by Side Diff: third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp

Issue 1859293002: [DevTools] Move Console to v8_inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "core/frame/DOMTimerCoordinator.h" 48 #include "core/frame/DOMTimerCoordinator.h"
49 #include "core/frame/Deprecation.h" 49 #include "core/frame/Deprecation.h"
50 #include "core/frame/LocalDOMWindow.h" 50 #include "core/frame/LocalDOMWindow.h"
51 #include "core/inspector/ConsoleMessage.h" 51 #include "core/inspector/ConsoleMessage.h"
52 #include "core/inspector/ConsoleMessageStorage.h" 52 #include "core/inspector/ConsoleMessageStorage.h"
53 #include "core/inspector/InspectorConsoleInstrumentation.h" 53 #include "core/inspector/InspectorConsoleInstrumentation.h"
54 #include "core/inspector/WorkerInspectorController.h" 54 #include "core/inspector/WorkerInspectorController.h"
55 #include "core/loader/WorkerThreadableLoader.h" 55 #include "core/loader/WorkerThreadableLoader.h"
56 #include "core/workers/WorkerNavigator.h" 56 #include "core/workers/WorkerNavigator.h"
57 #include "core/workers/WorkerClients.h" 57 #include "core/workers/WorkerClients.h"
58 #include "core/workers/WorkerConsole.h"
59 #include "core/workers/WorkerLoaderProxy.h" 58 #include "core/workers/WorkerLoaderProxy.h"
60 #include "core/workers/WorkerLocation.h" 59 #include "core/workers/WorkerLocation.h"
61 #include "core/workers/WorkerNavigator.h" 60 #include "core/workers/WorkerNavigator.h"
62 #include "core/workers/WorkerReportingProxy.h" 61 #include "core/workers/WorkerReportingProxy.h"
63 #include "core/workers/WorkerScriptLoader.h" 62 #include "core/workers/WorkerScriptLoader.h"
64 #include "core/workers/WorkerThread.h" 63 #include "core/workers/WorkerThread.h"
65 #include "platform/network/ContentSecurityPolicyParsers.h" 64 #include "platform/network/ContentSecurityPolicyParsers.h"
66 #include "platform/weborigin/KURL.h" 65 #include "platform/weborigin/KURL.h"
67 #include "platform/weborigin/SecurityOrigin.h" 66 #include "platform/weborigin/SecurityOrigin.h"
68 #include "public/platform/Platform.h" 67 #include "public/platform/Platform.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 m_location = WorkerLocation::create(m_url); 156 m_location = WorkerLocation::create(m_url);
158 return m_location.get(); 157 return m_location.get();
159 } 158 }
160 159
161 void WorkerGlobalScope::close() 160 void WorkerGlobalScope::close()
162 { 161 {
163 // Let current script run to completion, but tell the worker micro task runn er to tear down the thread after this task. 162 // Let current script run to completion, but tell the worker micro task runn er to tear down the thread after this task.
164 m_closing = true; 163 m_closing = true;
165 } 164 }
166 165
167 WorkerConsole* WorkerGlobalScope::console()
168 {
169 if (!m_console)
170 m_console = WorkerConsole::create(this);
171 return m_console.get();
172 }
173
174 WorkerNavigator* WorkerGlobalScope::navigator() const 166 WorkerNavigator* WorkerGlobalScope::navigator() const
175 { 167 {
176 if (!m_navigator) 168 if (!m_navigator)
177 m_navigator = WorkerNavigator::create(m_userAgent); 169 m_navigator = WorkerNavigator::create(m_userAgent);
178 return m_navigator.get(); 170 return m_navigator.get();
179 } 171 }
180 172
181 void WorkerGlobalScope::postTask(const WebTraceLocation& location, PassOwnPtr<Ex ecutionContextTask> task) 173 void WorkerGlobalScope::postTask(const WebTraceLocation& location, PassOwnPtr<Ex ecutionContextTask> task)
182 { 174 {
183 thread()->postTask(location, task); 175 thread()->postTask(location, task);
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 } 400 }
409 401
410 v8::Local<v8::Object> WorkerGlobalScope::associateWithWrapper(v8::Isolate*, cons t WrapperTypeInfo*, v8::Local<v8::Object> wrapper) 402 v8::Local<v8::Object> WorkerGlobalScope::associateWithWrapper(v8::Isolate*, cons t WrapperTypeInfo*, v8::Local<v8::Object> wrapper)
411 { 403 {
412 RELEASE_NOTREACHED(); // same as wrap method 404 RELEASE_NOTREACHED(); // same as wrap method
413 return v8::Local<v8::Object>(); 405 return v8::Local<v8::Object>();
414 } 406 }
415 407
416 DEFINE_TRACE(WorkerGlobalScope) 408 DEFINE_TRACE(WorkerGlobalScope)
417 { 409 {
418 visitor->trace(m_console);
419 visitor->trace(m_location); 410 visitor->trace(m_location);
420 visitor->trace(m_navigator); 411 visitor->trace(m_navigator);
421 visitor->trace(m_scriptController); 412 visitor->trace(m_scriptController);
422 visitor->trace(m_workerInspectorController); 413 visitor->trace(m_workerInspectorController);
423 visitor->trace(m_eventQueue); 414 visitor->trace(m_eventQueue);
424 visitor->trace(m_workerClients); 415 visitor->trace(m_workerClients);
425 visitor->trace(m_timers); 416 visitor->trace(m_timers);
426 visitor->trace(m_messageStorage); 417 visitor->trace(m_messageStorage);
427 visitor->trace(m_pendingMessages); 418 visitor->trace(m_pendingMessages);
428 visitor->trace(m_eventListeners); 419 visitor->trace(m_eventListeners);
429 ExecutionContext::trace(visitor); 420 ExecutionContext::trace(visitor);
430 EventTargetWithInlineData::trace(visitor); 421 EventTargetWithInlineData::trace(visitor);
431 SecurityContext::trace(visitor); 422 SecurityContext::trace(visitor);
432 Supplementable<WorkerGlobalScope>::trace(visitor); 423 Supplementable<WorkerGlobalScope>::trace(visitor);
433 } 424 }
434 425
435 } // namespace blink 426 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698