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

Unified Diff: chrome/browser/prerender/prerender_message_filter.h

Issue 9875026: **NOTFORLANDING** New link rel=prerender API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch sets 3-7 against trunk, for combined browsing Created 8 years, 8 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/browser/prerender/prerender_message_filter.h
diff --git a/chrome/browser/prerender/prerender_message_filter.h b/chrome/browser/prerender/prerender_message_filter.h
new file mode 100644
index 0000000000000000000000000000000000000000..5de831999500c13efa841949d60c6cb36ad35779
--- /dev/null
+++ b/chrome/browser/prerender/prerender_message_filter.h
@@ -0,0 +1,60 @@
+// 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 CHROME_BROWSER_PRERENDER_PRERENDER_MESSAGE_FILTER_H_
+#define CHROME_BROWSER_PRERENDER_PRERENDER_MESSAGE_FILTER_H_
+
+#include "base/compiler_specific.h"
+#include "content/public/browser/browser_message_filter.h"
+#include "content/public/browser/browser_thread.h"
+#include "googleurl/src/gurl.h"
+
+class Profile;
+
+namespace content {
+struct Referrer;
+}
+
+namespace gfx {
+class Size;
+}
+
+namespace IPC {
+class Message;
+}
+
+namespace prerender {
+
+class PrerenderMessageFilter : public content::BrowserMessageFilter {
+ public:
+ PrerenderMessageFilter(int render_process_id, Profile* profile);
+
+ virtual bool OnMessageReceived(const IPC::Message& message,
+ bool* message_was_ok) OVERRIDE;
+ virtual void OverrideThreadForMessage(
+ const IPC::Message& message,
+ content::BrowserThread::ID* thread) OVERRIDE;
+
+ private:
+ virtual ~PrerenderMessageFilter() { }
cbentzel 2012/04/24 15:42:59 Why are you inlining this destructor?
gavinp 2012/04/26 23:55:39 It's against the style guide, even. Fixed.
+
+ void OnAddPrerender(int prerender_id,
+ const GURL& url,
+ const content::Referrer& referrer,
+ const gfx::Size& size,
+ int render_view_route_id);
+ void OnCancelPrerender(int prerender_id);
+ void OnAbandonPrerender(int prerender_id);
+ virtual void OnChannelClosing() OVERRIDE;
+
cbentzel 2012/04/24 15:42:59 Nit: Remove extra newline.
gavinp 2012/04/26 23:55:39 Done.
+
+ const int render_process_id_;
+ Profile*const profile_;
cbentzel 2012/04/24 15:42:59 spaces please. I haven't really seen use of *const
gavinp 2012/04/26 23:55:39 Done. I'm a fan of making strong statements with
+
+ DISALLOW_COPY_AND_ASSIGN(PrerenderMessageFilter);
+};
+
+}
+
+#endif // CHROME_BROWSER_PRERENDER_PRERENDER_MESSAGE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698