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

Unified Diff: chrome/renderer/prefetch_helper.h

Issue 334483004: Enable resource prefetch from the browser process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make change in chrome rather than content Created 6 years, 6 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: chrome/renderer/prefetch_helper.h
diff --git a/chrome/renderer/prefetch_helper.h b/chrome/renderer/prefetch_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..846cd6700b00062b8587afc0650dd8902c906482
--- /dev/null
+++ b/chrome/renderer/prefetch_helper.h
@@ -0,0 +1,35 @@
+// Copyright (c) 2011 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 CHROME_RENDERER_PREFETCH_HELPER_H_
+#define CHROME_RENDERER_PREFETCH_HELPER_H_
+
+#include "content/public/renderer/render_frame_observer.h"
+#include "url/gurl.h"
+
+namespace prefetch {
+
+// Helper class iniitiate prefetches on behalf of a RenderFrame.
jam 2014/06/13 16:44:37 nit: spelling
tburkard 2014/06/13 18:35:46 Done.
+class PrefetchHelper : public content::RenderFrameObserver {
+ public:
+ explicit PrefetchHelper(content::RenderFrame* render_frame);
+ virtual ~PrefetchHelper();
+
+ private:
+ class PrefetchManager;
+
+ // RenderViewObserver implementation
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ void OnPrefetch(const GURL& url);
+
+ // A class keeping track of prefetches issued from the browser.
+ scoped_ptr<PrefetchManager> prefetch_manager_;
+
+ DISALLOW_COPY_AND_ASSIGN(PrefetchHelper);
+};
+
+} // namespace prefetch
+
+#endif // CHROME_RENDERER_PREFETCH_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698