OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 using namespace WebCore; | 65 using namespace WebCore; |
66 | 66 |
67 namespace WebKit { | 67 namespace WebKit { |
68 | 68 |
69 // Chromium-specific decorator of WorkerMessagingProxy. | 69 // Chromium-specific decorator of WorkerMessagingProxy. |
70 | 70 |
71 // static | 71 // static |
72 WorkerGlobalScopeProxy* WebWorkerClientImpl::createWorkerGlobalScopeProxy(Worker
* worker) | 72 WorkerGlobalScopeProxy* WebWorkerClientImpl::createWorkerGlobalScopeProxy(Worker
* worker) |
73 { | 73 { |
74 if (worker->scriptExecutionContext()->isDocument()) { | 74 if (worker->scriptExecutionContext()->isDocument()) { |
75 Document* document = static_cast<Document*>(worker->scriptExecutionConte
xt()); | 75 Document* document = toDocument(worker->scriptExecutionContext()); |
76 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); | 76 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); |
77 WebWorkerClientImpl* proxy = new WebWorkerClientImpl(worker, webFrame); | 77 WebWorkerClientImpl* proxy = new WebWorkerClientImpl(worker, webFrame); |
78 return proxy; | 78 return proxy; |
79 } | 79 } |
80 ASSERT_NOT_REACHED(); | 80 ASSERT_NOT_REACHED(); |
81 return 0; | 81 return 0; |
82 } | 82 } |
83 | 83 |
84 void WebWorkerClientImpl::terminateWorkerGlobalScope() | 84 void WebWorkerClientImpl::terminateWorkerGlobalScope() |
85 { | 85 { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 : WebCore::WorkerMessagingProxy(worker) | 152 : WebCore::WorkerMessagingProxy(worker) |
153 , m_webFrame(webFrame) | 153 , m_webFrame(webFrame) |
154 { | 154 { |
155 } | 155 } |
156 | 156 |
157 WebWorkerClientImpl::~WebWorkerClientImpl() | 157 WebWorkerClientImpl::~WebWorkerClientImpl() |
158 { | 158 { |
159 } | 159 } |
160 | 160 |
161 } // namespace WebKit | 161 } // namespace WebKit |
OLD | NEW |