OLD | NEW |
---|---|
(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_WEB_CONTENTS_OBSERVER_H_ | |
6 #define CONTENT_BROWSER_LOADER_LOADER_WEB_CONTENTS_OBSERVER_H_ | |
7 | |
8 #include "base/callback.h" | |
9 #include "content/browser/frame_host/frame_tree.h" | |
10 #include "content/public/browser/web_contents_observer.h" | |
11 | |
12 namespace content { | |
13 | |
14 class ResourceDispatcherHostImpl; | |
15 | |
16 // This class is responsible for notifying the IO thread (specifically, the | |
17 // ResourceDispatcherHostImpl) of frame events. It has an interace for callers | |
18 // to use and also sends notifications on WebContentsObserver events. | |
19 // | |
20 // TODO(csharrison): Add methods tracking visibility and audio changes, to | |
21 // propogate to the ResourceScheduler. | |
22 class LoaderIOThreadNotifer : public WebContentsObserver { | |
Randy Smith (Not in Mondays)
2015/12/29 23:11:37
A comment specifying the thread behavior of the cl
Charlie Harrison
2015/12/30 20:51:49
Done.
| |
23 public: | |
24 explicit LoaderIOThreadNotifer(WebContents* web_contents); | |
25 | |
26 // This method notifies the RDHI concerning the status of an entire frame | |
27 // tree. This will correspond to page-level events affecting resource loading. | |
28 static void NotifyForEachFrameOnIO( | |
29 FrameTree* frame_tree, | |
30 base::Callback<void(ResourceDispatcherHostImpl*, int, int)> | |
31 frame_callback); | |
32 | |
33 // content::WebContentsObserver: | |
34 void RenderFrameDeleted(RenderFrameHost* render_frame_host) override; | |
35 }; | |
36 | |
37 } // namespace content | |
38 | |
39 #endif // CONTENT_BROWSER_LOADER_LOADER_WEB_CONTENTS_OBSERVER_H_ | |
OLD | NEW |