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

Unified Diff: content/browser/renderer_host/resource_scheduler_filter.h

Issue 11270027: Add a ResourceScheduler to ResourceDispatcherHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/resource_scheduler_filter.h
diff --git a/content/browser/renderer_host/resource_scheduler_filter.h b/content/browser/renderer_host/resource_scheduler_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..d3bedeedb0704e990bdf41631eff4c274b1c4223
--- /dev/null
+++ b/content/browser/renderer_host/resource_scheduler_filter.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2012 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_RENDERER_HOST_RESOURCE_SCHEDULER_FILTER_H_
+#define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_SCHEDULER_FILTER_H_
+
+#include "content/public/browser/browser_message_filter.h"
+
+namespace content {
+class ResourceScheduler;
+
+// This class listens for incoming ViewHostMsgs that are applicable to the
+// ResourceScheduler and invokes the appropriate notifications. It must be
+// inserted before the RenderMessageFilter, because the ResourceScheduler runs
+// on the IO thread and we want to see the messages before the view messages are
+// bounced to the UI thread.
+class ResourceSchedulerFilter : public BrowserMessageFilter {
+ public:
+ ResourceSchedulerFilter(int child_id);
willchan no longer on Chromium 2012/10/25 19:44:49 explicit
James Simonsen 2012/11/17 02:56:15 Done.
+ virtual ~ResourceSchedulerFilter();
+
+ // BrowserMessageFilter methods:
+ virtual bool OnMessageReceived(const IPC::Message& message,
+ bool* message_was_ok) OVERRIDE;
+
+ private:
+ int child_id_;
+ ResourceScheduler* resource_scheduler_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_SCHEDULER_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698