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

Side by Side Diff: content/browser/loader/loader_io_thread_notifier.cc

Issue 2197763002: Move LoaderIOThreadNotifier out of resource_dispatcher_host_impl.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move definition Created 4 years, 4 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
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/loader/loader_io_thread_notifier.h"
6
7 #include "content/browser/frame_host/render_frame_host_impl.h"
8 #include "content/browser/loader/global_routing_id.h"
9 #include "content/browser/loader/resource_dispatcher_host_impl.h"
10 #include "content/public/browser/browser_thread.h"
11
12 namespace content {
13
14 namespace {
15
16 void NotifyRenderFrameDeletedOnIO(const GlobalFrameRoutingId& id) {
17 ResourceDispatcherHostImpl* rdhi = ResourceDispatcherHostImpl::Get();
18 if (rdhi)
19 rdhi->OnRenderFrameDeleted(id);
20 }
21
22 } // namespace
23
24 LoaderIOThreadNotifier::LoaderIOThreadNotifier(WebContents* web_contents)
25 : WebContentsObserver(web_contents) {}
26
27 LoaderIOThreadNotifier::~LoaderIOThreadNotifier() {}
28
29 void LoaderIOThreadNotifier::RenderFrameDeleted(
30 RenderFrameHost* render_frame_host) {
31 BrowserThread::PostTask(
32 BrowserThread::IO, FROM_HERE,
33 base::Bind(&NotifyRenderFrameDeletedOnIO,
34 static_cast<RenderFrameHostImpl*>(render_frame_host)
35 ->GetGlobalFrameRoutingId()));
36 }
37
38 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/loader_io_thread_notifier.h ('k') | content/browser/loader/resource_dispatcher_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698