| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Apple Inc. All rights reserved. | 3 * Copyright (C) 2010 Apple 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 are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "core/dom/ScriptExecutionContext.h" | 39 #include "core/dom/ScriptExecutionContext.h" |
| 40 #include "core/inspector/InspectorInstrumentation.h" | 40 #include "core/inspector/InspectorInstrumentation.h" |
| 41 #include "core/page/UseCounter.h" | 41 #include "core/page/UseCounter.h" |
| 42 #include "core/workers/SharedWorkerRepository.h" | 42 #include "core/workers/SharedWorkerRepository.h" |
| 43 #include "weborigin/KURL.h" | 43 #include "weborigin/KURL.h" |
| 44 #include "weborigin/SecurityOrigin.h" | 44 #include "weborigin/SecurityOrigin.h" |
| 45 | 45 |
| 46 namespace WebCore { | 46 namespace WebCore { |
| 47 | 47 |
| 48 inline SharedWorker::SharedWorker(ScriptExecutionContext* context) | 48 inline SharedWorker::SharedWorker(ScriptExecutionContext* context) |
| 49 : AbstractWorker(context) | 49 : ActiveDOMObject(context) |
| 50 { | 50 { |
| 51 ScriptWrappable::init(this); | 51 ScriptWrappable::init(this); |
| 52 } | 52 } |
| 53 | 53 |
| 54 PassRefPtr<SharedWorker> SharedWorker::create(ScriptExecutionContext* context, c
onst String& url, const String& name, ExceptionCode& ec) | 54 PassRefPtr<SharedWorker> SharedWorker::create(ScriptExecutionContext* context, c
onst String& url, const String& name, ExceptionCode& ec) |
| 55 { | 55 { |
| 56 ASSERT(isMainThread()); | 56 ASSERT(isMainThread()); |
| 57 UseCounter::count(static_cast<Document*>(context)->domWindow(), UseCounter::
SharedWorkerStart); | 57 UseCounter::count(static_cast<Document*>(context)->domWindow(), UseCounter::
SharedWorkerStart); |
| 58 | 58 |
| 59 RefPtr<SharedWorker> worker = adoptRef(new SharedWorker(context)); | 59 RefPtr<SharedWorker> worker = adoptRef(new SharedWorker(context)); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 84 | 84 |
| 85 SharedWorker::~SharedWorker() | 85 SharedWorker::~SharedWorker() |
| 86 { | 86 { |
| 87 } | 87 } |
| 88 | 88 |
| 89 const AtomicString& SharedWorker::interfaceName() const | 89 const AtomicString& SharedWorker::interfaceName() const |
| 90 { | 90 { |
| 91 return eventNames().interfaceForSharedWorker; | 91 return eventNames().interfaceForSharedWorker; |
| 92 } | 92 } |
| 93 | 93 |
| 94 void SharedWorker::contextDestroyed() |
| 95 { |
| 96 ActiveDOMObject::contextDestroyed(); |
| 97 } |
| 98 |
| 94 } // namespace WebCore | 99 } // namespace WebCore |
| OLD | NEW |