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

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

Issue 281393002: Revert of Make all layout tests force composited (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/core/testing/DummyPageHolder.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "core/workers/WorkerScriptLoader.h" 43 #include "core/workers/WorkerScriptLoader.h"
44 #include "core/workers/WorkerScriptLoaderClient.h" 44 #include "core/workers/WorkerScriptLoaderClient.h"
45 #include "core/workers/WorkerThreadStartupData.h" 45 #include "core/workers/WorkerThreadStartupData.h"
46 #include "modules/serviceworkers/ServiceWorkerThread.h" 46 #include "modules/serviceworkers/ServiceWorkerThread.h"
47 #include "platform/NotImplemented.h" 47 #include "platform/NotImplemented.h"
48 #include "platform/SharedBuffer.h" 48 #include "platform/SharedBuffer.h"
49 #include "platform/heap/Handle.h" 49 #include "platform/heap/Handle.h"
50 #include "platform/network/ContentSecurityPolicyParsers.h" 50 #include "platform/network/ContentSecurityPolicyParsers.h"
51 #include "public/web/WebServiceWorkerContextClient.h" 51 #include "public/web/WebServiceWorkerContextClient.h"
52 #include "public/web/WebServiceWorkerNetworkProvider.h" 52 #include "public/web/WebServiceWorkerNetworkProvider.h"
53 #include "public/web/WebSettings.h"
54 #include "public/web/WebView.h" 53 #include "public/web/WebView.h"
55 #include "public/web/WebWorkerPermissionClientProxy.h" 54 #include "public/web/WebWorkerPermissionClientProxy.h"
56 #include "web/ServiceWorkerGlobalScopeClientImpl.h" 55 #include "web/ServiceWorkerGlobalScopeClientImpl.h"
57 #include "web/ServiceWorkerGlobalScopeProxy.h" 56 #include "web/ServiceWorkerGlobalScopeProxy.h"
58 #include "web/WebDataSourceImpl.h" 57 #include "web/WebDataSourceImpl.h"
59 #include "web/WebLocalFrameImpl.h" 58 #include "web/WebLocalFrameImpl.h"
60 #include "web/WorkerPermissionClient.h" 59 #include "web/WorkerPermissionClient.h"
61 #include "wtf/Functional.h" 60 #include "wtf/Functional.h"
62 61
63 using namespace WebCore; 62 using namespace WebCore;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 void WebEmbeddedWorkerImpl::prepareShadowPageForLoader() 249 void WebEmbeddedWorkerImpl::prepareShadowPageForLoader()
251 { 250 {
252 // Create 'shadow page', which is never displayed and is used mainly to 251 // Create 'shadow page', which is never displayed and is used mainly to
253 // provide a context for loading on the main thread. 252 // provide a context for loading on the main thread.
254 // 253 //
255 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader. 254 // FIXME: This does mostly same as WebSharedWorkerImpl::initializeLoader.
256 // This code, and probably most of the code in this class should be shared 255 // This code, and probably most of the code in this class should be shared
257 // with SharedWorker. 256 // with SharedWorker.
258 ASSERT(!m_webView); 257 ASSERT(!m_webView);
259 m_webView = WebView::create(0); 258 m_webView = WebView::create(0);
260 // FIXME: http://crbug.com/363843. This needs to find a better way to
261 // not create graphics layers.
262 m_webView->settings()->setAcceleratedCompositingEnabled(false);
263 m_mainFrame = WebLocalFrame::create(this); 259 m_mainFrame = WebLocalFrame::create(this);
264 m_webView->setMainFrame(m_mainFrame); 260 m_webView->setMainFrame(m_mainFrame);
265 261
266 WebLocalFrameImpl* webFrame = toWebLocalFrameImpl(m_webView->mainFrame()); 262 WebLocalFrameImpl* webFrame = toWebLocalFrameImpl(m_webView->mainFrame());
267 263
268 // Construct substitute data source for the 'shadow page'. We only need it 264 // Construct substitute data source for the 'shadow page'. We only need it
269 // to have same origin as the worker so the loading checks work correctly. 265 // to have same origin as the worker so the loading checks work correctly.
270 CString content(""); 266 CString content("");
271 int length = static_cast<int>(content.length()); 267 int length = static_cast<int>(content.length());
272 RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), length)); 268 RefPtr<SharedBuffer> buffer(SharedBuffer::create(content.data(), length));
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 m_mainScriptLoader.clear(); 324 m_mainScriptLoader.clear();
329 325
330 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *toW ebLocalFrameImpl(m_mainFrame)->frame()->document(), *m_workerContextClient); 326 m_workerGlobalScopeProxy = ServiceWorkerGlobalScopeProxy::create(*this, *toW ebLocalFrameImpl(m_mainFrame)->frame()->document(), *m_workerContextClient);
331 m_loaderProxy = LoaderProxy::create(*this); 327 m_loaderProxy = LoaderProxy::create(*this);
332 328
333 m_workerThread = ServiceWorkerThread::create(*m_loaderProxy, *m_workerGlobal ScopeProxy, startupData.release()); 329 m_workerThread = ServiceWorkerThread::create(*m_loaderProxy, *m_workerGlobal ScopeProxy, startupData.release());
334 m_workerThread->start(); 330 m_workerThread->start();
335 } 331 }
336 332
337 } // namespace blink 333 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/testing/DummyPageHolder.cpp ('k') | Source/web/WebSharedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698