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

Side by Side Diff: content/browser/loader/loader_io_thread_notifier_impl.h

Issue 1542743002: [RDHI] Refactored blocked_loaders_map_ to key by render frame route id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 11 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 2015 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 #ifndef CONTENT_BROWSER_LOADER_LOADER_IO_THREAD_NOTIFIER_IMPL_H_
6 #define CONTENT_BROWSER_LOADER_LOADER_IO_THREAD_NOTIFIER_IMPL_H_
7
8 #include "base/callback.h"
9 #include "content/browser/frame_host/frame_tree.h"
10 #include "content/browser/loader/global_routing_id.h"
11 #include "content/public/browser/loader_io_thread_notifier.h"
12 #include "content/public/browser/web_contents_observer.h"
13
14 namespace content {
15
16 class RenderFrameHost;
17 class ResourceDispatcherHostImpl;
18
19 // This class is responsible for notifying the IO thread (specifically, the
20 // ResourceDispatcherHostImpl) of frame events. It has an interace for callers
21 // to use and also sends notifications on WebContentsObserver events. All
22 // methods (static or class) will be called from the UI thread and post to the
23 // IO
24 // thread.
Randy Smith (Not in Mondays) 2016/01/06 21:56:30 nit: Remove unneeded newline?
Charlie Harrison 2016/01/07 22:47:05 Done.
25 //
26 // TODO(csharrison): Add methods tracking visibility and audio changes, to
27 // propogate to the ResourceScheduler.
28 class LoaderIOThreadNotifierImpl : public LoaderIOThreadNotifier,
29 public WebContentsObserver {
30 public:
31 explicit LoaderIOThreadNotifierImpl(WebContents* web_contents);
32 ~LoaderIOThreadNotifierImpl() override;
33
34 // Only use this method if the render frame host is not initialized yet or
35 // inaccessible, but the route is known. Otherwise, use the methods that
36 // explicitly take a RenderFrameHost*.
Randy Smith (Not in Mondays) 2016/01/06 21:56:30 Hmmm. I find this comment a little confusing. Th
Charlie Harrison 2016/01/07 22:47:05 I was referring to the non-impl static methods. I'
37 static void ResumeBlockedRequestsForFrameInternal(
38 const GlobalFrameRoutingId& routing_id);
39
40 // This method notifies the RDHI concerning the status of an entire frame
41 // tree. This will correspond to page-level events affecting resource loading.
42 static void NotifyForEachFrame(
43 FrameTree* frame_tree,
44 base::Callback<void(ResourceDispatcherHostImpl*,
45 const GlobalFrameRoutingId&)> frame_callback);
46
47 // content::WebContentsObserver:
48 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
49 };
50
51 } // namespace content
52
53 #endif // CONTENT_BROWSER_LOADER_LOADER_IO_THREAD_NOTIFIER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698