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

Side by Side Diff: Source/web/WebSharedWorkerImpl.cpp

Issue 398673003: Rename WebCore namespace to blink in bindings and web (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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
« no previous file with comments | « Source/web/WebSharedWorkerImpl.h ('k') | Source/web/WebSocketImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #include "public/web/WebView.h" 64 #include "public/web/WebView.h"
65 #include "public/web/WebWorkerPermissionClientProxy.h" 65 #include "public/web/WebWorkerPermissionClientProxy.h"
66 #include "web/DatabaseClientImpl.h" 66 #include "web/DatabaseClientImpl.h"
67 #include "web/LocalFileSystemClient.h" 67 #include "web/LocalFileSystemClient.h"
68 #include "web/WebDataSourceImpl.h" 68 #include "web/WebDataSourceImpl.h"
69 #include "web/WebLocalFrameImpl.h" 69 #include "web/WebLocalFrameImpl.h"
70 #include "web/WorkerPermissionClient.h" 70 #include "web/WorkerPermissionClient.h"
71 #include "wtf/Functional.h" 71 #include "wtf/Functional.h"
72 #include "wtf/MainThread.h" 72 #include "wtf/MainThread.h"
73 73
74 using namespace WebCore; 74 using namespace blink;
75 75
76 namespace blink { 76 namespace blink {
77 77
78 // A thin wrapper for one-off script loading. 78 // A thin wrapper for one-off script loading.
79 class WebSharedWorkerImpl::Loader : public WorkerScriptLoaderClient { 79 class WebSharedWorkerImpl::Loader : public WorkerScriptLoaderClient {
80 public: 80 public:
81 static PassOwnPtr<Loader> create() 81 static PassOwnPtr<Loader> create()
82 { 82 {
83 return adoptPtr(new Loader()); 83 return adoptPtr(new Loader());
84 } 84 }
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 if (!m_askedToTerminate) 358 if (!m_askedToTerminate)
359 delete this; 359 delete this;
360 return; 360 return;
361 } 361 }
362 WorkerThreadStartMode startMode = m_pauseWorkerContextOnStart ? PauseWorkerG lobalScopeOnStart : DontPauseWorkerGlobalScopeOnStart; 362 WorkerThreadStartMode startMode = m_pauseWorkerContextOnStart ? PauseWorkerG lobalScopeOnStart : DontPauseWorkerGlobalScopeOnStart;
363 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create(); 363 OwnPtrWillBeRawPtr<WorkerClients> workerClients = WorkerClients::create();
364 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c reate()); 364 provideLocalFileSystemToWorker(workerClients.get(), LocalFileSystemClient::c reate());
365 provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::creat e()); 365 provideDatabaseClientToWorker(workerClients.get(), DatabaseClientImpl::creat e());
366 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin()); 366 WebSecurityOrigin webSecurityOrigin(m_loadingDocument->securityOrigin());
367 providePermissionClientToWorker(workerClients.get(), adoptPtr(client()->crea teWorkerPermissionClientProxy(webSecurityOrigin))); 367 providePermissionClientToWorker(workerClients.get(), adoptPtr(client()->crea teWorkerPermissionClientProxy(webSecurityOrigin)));
368 OwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData = WorkerThreadStartu pData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->sc ript(), startMode, m_contentSecurityPolicy, static_cast<WebCore::ContentSecurity PolicyHeaderType>(m_policyType), workerClients.release()); 368 OwnPtrWillBeRawPtr<WorkerThreadStartupData> startupData = WorkerThreadStartu pData::create(m_url, m_loadingDocument->userAgent(m_url), m_mainScriptLoader->sc ript(), startMode, m_contentSecurityPolicy, static_cast<blink::ContentSecurityPo licyHeaderType>(m_policyType), workerClients.release());
369 setWorkerThread(SharedWorkerThread::create(m_name, *this, *this, startupData .release())); 369 setWorkerThread(SharedWorkerThread::create(m_name, *this, *this, startupData .release()));
370 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri ptLoader->identifier(), m_mainScriptLoader->script()); 370 InspectorInstrumentation::scriptImported(m_loadingDocument.get(), m_mainScri ptLoader->identifier(), m_mainScriptLoader->script());
371 m_mainScriptLoader.clear(); 371 m_mainScriptLoader.clear();
372 372
373 if (m_attachDevToolsOnStart) 373 if (m_attachDevToolsOnStart)
374 workerThread()->runLoop().postDebuggerTask(createCrossThreadTask(connect ToWorkerContextInspectorTask, true)); 374 workerThread()->runLoop().postDebuggerTask(createCrossThreadTask(connect ToWorkerContextInspectorTask, true));
375 375
376 workerThread()->start(); 376 workerThread()->start();
377 if (client()) 377 if (client())
378 client()->workerScriptLoaded(); 378 client()->workerScriptLoaded();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 workerThread()->runLoop().postDebuggerTask(createCrossThreadTask(dispatchOnI nspectorBackendTask, String(message))); 446 workerThread()->runLoop().postDebuggerTask(createCrossThreadTask(dispatchOnI nspectorBackendTask, String(message)));
447 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread()); 447 WorkerDebuggerAgent::interruptAndDispatchInspectorCommands(workerThread());
448 } 448 }
449 449
450 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) 450 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client)
451 { 451 {
452 return new WebSharedWorkerImpl(client); 452 return new WebSharedWorkerImpl(client);
453 } 453 }
454 454
455 } // namespace blink 455 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebSharedWorkerImpl.h ('k') | Source/web/WebSocketImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698