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

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

Issue 2874133002: Removed WebFrameClient.cpp from Source/web (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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 // to have same origin as the worker so the loading checks work correctly. 314 // to have same origin as the worker so the loading checks work correctly.
315 CString content(""); 315 CString content("");
316 RefPtr<SharedBuffer> buffer( 316 RefPtr<SharedBuffer> buffer(
317 SharedBuffer::Create(content.data(), content.length())); 317 SharedBuffer::Create(content.data(), content.length()));
318 loading_shadow_page_ = true; 318 loading_shadow_page_ = true;
319 main_frame_->GetFrame()->Loader().Load( 319 main_frame_->GetFrame()->Loader().Load(
320 FrameLoadRequest(0, ResourceRequest(worker_start_data_.script_url), 320 FrameLoadRequest(0, ResourceRequest(worker_start_data_.script_url),
321 SubstituteData(buffer, "text/html", "UTF-8", KURL()))); 321 SubstituteData(buffer, "text/html", "UTF-8", KURL())));
322 } 322 }
323 323
324 void WebEmbeddedWorkerImpl::FrameDetached(WebLocalFrame* frame,
325 DetachType type) {
326 if (type == DetachType::kRemove && frame->Parent())
327 frame->Parent()->RemoveChild(frame);
kinuko.yasuda 2017/05/11 04:07:17 I think we can remove this (and possibly below) an
sashab 2017/05/15 02:18:02 Added TODOs for both :) Will do in follow-up patch
dcheng 2017/05/15 03:58:47 Given that we fixed up the other places (in WebVie
sashab 2017/05/15 06:23:48 Done :)
328
329 if (frame->FrameWidget())
330 frame->FrameWidget()->Close();
331
332 frame->Close();
333 }
334
324 void WebEmbeddedWorkerImpl::DidFinishDocumentLoad() { 335 void WebEmbeddedWorkerImpl::DidFinishDocumentLoad() {
325 DCHECK(!main_script_loader_); 336 DCHECK(!main_script_loader_);
326 DCHECK(main_frame_); 337 DCHECK(main_frame_);
327 DCHECK(worker_context_client_); 338 DCHECK(worker_context_client_);
328 DCHECK(loading_shadow_page_); 339 DCHECK(loading_shadow_page_);
329 DCHECK(!asked_to_terminate_); 340 DCHECK(!asked_to_terminate_);
330 loading_shadow_page_ = false; 341 loading_shadow_page_ = false;
331 main_frame_->DataSource()->SetServiceWorkerNetworkProvider( 342 main_frame_->DataSource()->SetServiceWorkerNetworkProvider(
332 worker_context_client_->CreateServiceWorkerNetworkProvider()); 343 worker_context_client_->CreateServiceWorkerNetworkProvider());
333 main_script_loader_ = WorkerScriptLoader::Create(); 344 main_script_loader_ = WorkerScriptLoader::Create();
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 // populate the task runners with null document not to confuse the frame 484 // 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). 485 // scheduler (which will end up using the thread's default task runner).
475 worker_thread_->Start(std::move(startup_data), 486 worker_thread_->Start(std::move(startup_data),
476 ParentFrameTaskRunners::Create(nullptr)); 487 ParentFrameTaskRunners::Create(nullptr));
477 488
478 worker_inspector_proxy_->WorkerThreadCreated(document, worker_thread_.get(), 489 worker_inspector_proxy_->WorkerThreadCreated(document, worker_thread_.get(),
479 script_url); 490 script_url);
480 } 491 }
481 492
482 } // namespace blink 493 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698