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

Unified Diff: content/browser/loader/loader_io_thread_notifier.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: just comments / minor restructuring (trybots previous) Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/loader_io_thread_notifier.h
diff --git a/content/browser/loader/loader_io_thread_notifier.h b/content/browser/loader/loader_io_thread_notifier.h
new file mode 100644
index 0000000000000000000000000000000000000000..920795510fc00d698c75b51ddf8d850fd498f0da
--- /dev/null
+++ b/content/browser/loader/loader_io_thread_notifier.h
@@ -0,0 +1,39 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_LOADER_LOADER_WEB_CONTENTS_OBSERVER_H_
+#define CONTENT_BROWSER_LOADER_LOADER_WEB_CONTENTS_OBSERVER_H_
+
+#include "base/callback.h"
+#include "content/browser/frame_host/frame_tree.h"
+#include "content/public/browser/web_contents_observer.h"
+
+namespace content {
+
+class ResourceDispatcherHostImpl;
+
+// This class is responsible for notifying the IO thread (specifically, the
+// ResourceDispatcherHostImpl) of frame events. It has an interace for callers
+// to use and also sends notifications on WebContentsObserver events.
+//
+// TODO(csharrison): Add methods tracking visibility and audio changes, to
+// propogate to the ResourceScheduler.
+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.
+ public:
+ explicit LoaderIOThreadNotifer(WebContents* web_contents);
+
+ // This method notifies the RDHI concerning the status of an entire frame
+ // tree. This will correspond to page-level events affecting resource loading.
+ static void NotifyForEachFrameOnIO(
+ FrameTree* frame_tree,
+ base::Callback<void(ResourceDispatcherHostImpl*, int, int)>
+ frame_callback);
+
+ // content::WebContentsObserver:
+ void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_LOADER_LOADER_WEB_CONTENTS_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698