OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2012 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 CHROME_BROWSER_PRERENDER_PRERENDER_MESSAGE_FILTER_H_ | |
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MESSAGE_FILTER_H_ | |
7 | |
8 #include "base/compiler_specific.h" | |
9 #include "content/public/browser/browser_message_filter.h" | |
10 #include "content/public/browser/browser_thread.h" | |
jam
2012/04/27 15:59:50
nit: not needed, since by definition browser_messa
gavinp
2012/04/27 20:31:32
Done.
| |
11 #include "googleurl/src/gurl.h" | |
12 | |
13 class Profile; | |
14 | |
15 namespace content { | |
16 struct Referrer; | |
17 } | |
18 | |
19 namespace gfx { | |
20 class Size; | |
21 } | |
22 | |
23 namespace IPC { | |
24 class Message; | |
25 } | |
26 | |
27 namespace prerender { | |
28 | |
29 class PrerenderMessageFilter : public content::BrowserMessageFilter { | |
30 public: | |
31 PrerenderMessageFilter(int render_process_id, Profile* profile); | |
32 | |
33 virtual bool OnMessageReceived(const IPC::Message& message, | |
34 bool* message_was_ok) OVERRIDE; | |
35 virtual void OverrideThreadForMessage( | |
36 const IPC::Message& message, | |
37 content::BrowserThread::ID* thread) OVERRIDE; | |
38 | |
39 private: | |
40 virtual ~PrerenderMessageFilter(); | |
41 | |
42 void OnAddPrerender(int prerender_id, | |
43 const GURL& url, | |
44 const content::Referrer& referrer, | |
45 const gfx::Size& size, | |
46 int render_view_route_id); | |
47 void OnCancelPrerender(int prerender_id); | |
48 void OnAbandonPrerender(int prerender_id); | |
49 virtual void OnChannelClosing() OVERRIDE; | |
50 | |
51 const int render_process_id_; | |
52 Profile* const profile_; | |
53 | |
54 DISALLOW_COPY_AND_ASSIGN(PrerenderMessageFilter); | |
55 }; | |
56 | |
57 } | |
58 | |
59 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MESSAGE_FILTER_H_ | |
60 | |
OLD | NEW |