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

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

Issue 2881693002: Move more classes to WebLocalFrameBase instead of WebLocalFrameImpl. (Closed)
Patch Set: Created 3 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
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 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #include "web/WebEmbeddedWorkerImpl.h" 31 #include "web/WebEmbeddedWorkerImpl.h"
32 32
33 #include <memory> 33 #include <memory>
34 #include "bindings/core/v8/SourceLocation.h" 34 #include "bindings/core/v8/SourceLocation.h"
35 #include "core/dom/Document.h" 35 #include "core/dom/Document.h"
36 #include "core/dom/SecurityContext.h" 36 #include "core/dom/SecurityContext.h"
37 #include "core/dom/TaskRunnerHelper.h" 37 #include "core/dom/TaskRunnerHelper.h"
38 #include "core/exported/WebDataSourceImpl.h" 38 #include "core/exported/WebDataSourceImpl.h"
39 #include "core/frame/WebLocalFrameBase.h"
39 #include "core/frame/csp/ContentSecurityPolicy.h" 40 #include "core/frame/csp/ContentSecurityPolicy.h"
40 #include "core/inspector/ConsoleMessage.h" 41 #include "core/inspector/ConsoleMessage.h"
41 #include "core/loader/FrameLoadRequest.h" 42 #include "core/loader/FrameLoadRequest.h"
42 #include "core/loader/ThreadableLoadingContext.h" 43 #include "core/loader/ThreadableLoadingContext.h"
43 #include "core/loader/WorkerFetchContext.h" 44 #include "core/loader/WorkerFetchContext.h"
44 #include "core/probe/CoreProbes.h" 45 #include "core/probe/CoreProbes.h"
45 #include "core/workers/ParentFrameTaskRunners.h" 46 #include "core/workers/ParentFrameTaskRunners.h"
46 #include "core/workers/WorkerClients.h" 47 #include "core/workers/WorkerClients.h"
47 #include "core/workers/WorkerContentSettingsClient.h" 48 #include "core/workers/WorkerContentSettingsClient.h"
48 #include "core/workers/WorkerGlobalScope.h" 49 #include "core/workers/WorkerGlobalScope.h"
(...skipping 21 matching lines...) Expand all
70 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h" 71 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h"
71 #include "public/web/WebConsoleMessage.h" 72 #include "public/web/WebConsoleMessage.h"
72 #include "public/web/WebDevToolsAgent.h" 73 #include "public/web/WebDevToolsAgent.h"
73 #include "public/web/WebSettings.h" 74 #include "public/web/WebSettings.h"
74 #include "public/web/WebView.h" 75 #include "public/web/WebView.h"
75 #include "public/web/WebWorkerContentSettingsClientProxy.h" 76 #include "public/web/WebWorkerContentSettingsClientProxy.h"
76 #include "public/web/modules/serviceworker/WebServiceWorkerContextClient.h" 77 #include "public/web/modules/serviceworker/WebServiceWorkerContextClient.h"
77 #include "web/IndexedDBClientImpl.h" 78 #include "web/IndexedDBClientImpl.h"
78 #include "web/ServiceWorkerGlobalScopeClientImpl.h" 79 #include "web/ServiceWorkerGlobalScopeClientImpl.h"
79 #include "web/ServiceWorkerGlobalScopeProxy.h" 80 #include "web/ServiceWorkerGlobalScopeProxy.h"
80 #include "web/WebLocalFrameImpl.h"
81 81
82 namespace blink { 82 namespace blink {
83 83
84 WebEmbeddedWorker* WebEmbeddedWorker::Create( 84 WebEmbeddedWorker* WebEmbeddedWorker::Create(
85 WebServiceWorkerContextClient* client, 85 WebServiceWorkerContextClient* client,
86 WebWorkerContentSettingsClientProxy* content_settings_client) { 86 WebWorkerContentSettingsClientProxy* content_settings_client) {
87 return new WebEmbeddedWorkerImpl(WTF::WrapUnique(client), 87 return new WebEmbeddedWorkerImpl(WTF::WrapUnique(client),
88 WTF::WrapUnique(content_settings_client)); 88 WTF::WrapUnique(content_settings_client));
89 } 89 }
90 90
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 WebSettings* settings = web_view_->GetSettings(); 286 WebSettings* settings = web_view_->GetSettings();
287 // FIXME: http://crbug.com/363843. This needs to find a better way to 287 // FIXME: http://crbug.com/363843. This needs to find a better way to
288 // not create graphics layers. 288 // not create graphics layers.
289 settings->SetAcceleratedCompositingEnabled(false); 289 settings->SetAcceleratedCompositingEnabled(false);
290 // Currently we block all mixed-content requests from a ServiceWorker. 290 // Currently we block all mixed-content requests from a ServiceWorker.
291 // FIXME: When we support FetchEvent.default(), we should relax this 291 // FIXME: When we support FetchEvent.default(), we should relax this
292 // restriction. 292 // restriction.
293 settings->SetStrictMixedContentChecking(true); 293 settings->SetStrictMixedContentChecking(true);
294 settings->SetAllowRunningOfInsecureContent(false); 294 settings->SetAllowRunningOfInsecureContent(false);
295 settings->SetDataSaverEnabled(worker_start_data_.data_saver_enabled); 295 settings->SetDataSaverEnabled(worker_start_data_.data_saver_enabled);
296 main_frame_ = ToWebLocalFrameImpl(WebLocalFrame::Create( 296 main_frame_ = ToWebLocalFrameBase(WebLocalFrame::Create(
297 WebTreeScopeType::kDocument, this, nullptr, nullptr)); 297 WebTreeScopeType::kDocument, this, nullptr, nullptr));
298 web_view_->SetMainFrame(main_frame_.Get()); 298 web_view_->SetMainFrame(main_frame_.Get());
299 main_frame_->SetDevToolsAgentClient(this); 299 main_frame_->SetDevToolsAgentClient(this);
300 300
301 // If we were asked to wait for debugger then it is the good time to do that. 301 // If we were asked to wait for debugger then it is the good time to do that.
302 worker_context_client_->WorkerReadyForInspection(); 302 worker_context_client_->WorkerReadyForInspection();
303 if (worker_start_data_.wait_for_debugger_mode == 303 if (worker_start_data_.wait_for_debugger_mode ==
304 WebEmbeddedWorkerStartData::kWaitForDebugger) { 304 WebEmbeddedWorkerStartData::kWaitForDebugger) {
305 waiting_for_debugger_state_ = kWaitingForDebugger; 305 waiting_for_debugger_state_ = kWaitingForDebugger;
306 return; 306 return;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 // populate the task runners with null document not to confuse the frame 473 // populate the task runners with null document not to confuse the frame
474 // scheduler (which will end up using the thread's default task runner). 474 // scheduler (which will end up using the thread's default task runner).
475 worker_thread_->Start(std::move(startup_data), 475 worker_thread_->Start(std::move(startup_data),
476 ParentFrameTaskRunners::Create(nullptr)); 476 ParentFrameTaskRunners::Create(nullptr));
477 477
478 worker_inspector_proxy_->WorkerThreadCreated(document, worker_thread_.get(), 478 worker_inspector_proxy_->WorkerThreadCreated(document, worker_thread_.get(),
479 script_url); 479 script_url);
480 } 480 }
481 481
482 } // namespace blink 482 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.h ('k') | third_party/WebKit/Source/web/WebFrameSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698