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

Side by Side Diff: Source/WebKit/chromium/src/WebWorkerClientImpl.cpp

Issue 17648006: Rename WorkerContext to WorkerGlobalScope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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 | Annotate | Revision Log
OLDNEW
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 29 matching lines...) Expand all
40 #include "core/dom/MessagePortChannel.h" 40 #include "core/dom/MessagePortChannel.h"
41 #include "core/dom/ScriptExecutionContext.h" 41 #include "core/dom/ScriptExecutionContext.h"
42 #include "core/inspector/InspectorInstrumentation.h" 42 #include "core/inspector/InspectorInstrumentation.h"
43 #include "core/inspector/ScriptCallStack.h" 43 #include "core/inspector/ScriptCallStack.h"
44 #include "core/loader/FrameLoaderClient.h" 44 #include "core/loader/FrameLoaderClient.h"
45 #include "core/page/Frame.h" 45 #include "core/page/Frame.h"
46 #include "core/page/Page.h" 46 #include "core/page/Page.h"
47 #include "core/page/PageGroup.h" 47 #include "core/page/PageGroup.h"
48 #include "core/workers/DedicatedWorkerThread.h" 48 #include "core/workers/DedicatedWorkerThread.h"
49 #include "core/workers/Worker.h" 49 #include "core/workers/Worker.h"
50 #include "core/workers/WorkerContext.h" 50 #include "core/workers/WorkerGlobalScope.h"
51 #include "core/workers/WorkerMessagingProxy.h" 51 #include "core/workers/WorkerMessagingProxy.h"
52 #include <wtf/Threading.h> 52 #include <wtf/Threading.h>
53 53
54 #include "FrameLoaderClientImpl.h" 54 #include "FrameLoaderClientImpl.h"
55 #include "WebFrameClient.h" 55 #include "WebFrameClient.h"
56 #include "WebFrameImpl.h" 56 #include "WebFrameImpl.h"
57 #include "WebPermissionClient.h" 57 #include "WebPermissionClient.h"
58 #include "WebViewImpl.h" 58 #include "WebViewImpl.h"
59 #include "core/dom/default/chromium/PlatformMessagePortChannelChromium.h" 59 #include "core/dom/default/chromium/PlatformMessagePortChannelChromium.h"
60 #include "public/platform/WebFileSystemCallbacks.h" 60 #include "public/platform/WebFileSystemCallbacks.h"
61 #include "public/platform/WebMessagePortChannel.h" 61 #include "public/platform/WebMessagePortChannel.h"
62 #include "public/platform/WebString.h" 62 #include "public/platform/WebString.h"
63 #include "public/platform/WebURL.h" 63 #include "public/platform/WebURL.h"
64 64
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 WorkerContextProxy* WebWorkerClientImpl::createWorkerContextProxy(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 = static_cast<Document*>(worker->scriptExecutionConte xt());
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::terminateWorkerContext() 84 void WebWorkerClientImpl::terminateWorkerGlobalScope()
85 { 85 {
86 m_webFrame = 0; 86 m_webFrame = 0;
87 WebCore::WorkerMessagingProxy::terminateWorkerContext(); 87 WebCore::WorkerMessagingProxy::terminateWorkerGlobalScope();
88 } 88 }
89 89
90 WebWorkerBase* WebWorkerClientImpl::toWebWorkerBase() 90 WebWorkerBase* WebWorkerClientImpl::toWebWorkerBase()
91 { 91 {
92 return this; 92 return this;
93 } 93 }
94 94
95 WebView* WebWorkerClientImpl::view() const 95 WebView* WebWorkerClientImpl::view() const
96 { 96 {
97 if (askedToTerminate()) 97 if (askedToTerminate())
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/WebWorkerClientImpl.h ('k') | Source/WebKit/chromium/src/WorkerAllowMainThreadBridgeBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698