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 "googleurl/src/gurl.h" | |
11 | |
12 class Profile; | |
13 | |
14 namespace content { | |
15 struct Referrer; | |
16 } | |
17 | |
18 namespace gfx { | |
19 class Size; | |
20 } | |
21 | |
22 namespace IPC { | |
23 class Message; | |
24 } | |
25 | |
26 namespace prerender { | |
27 | |
28 class PrerenderMessageFilter : public content::BrowserMessageFilter { | |
29 public: | |
30 PrerenderMessageFilter(int render_process_id, Profile* profile); | |
31 | |
32 virtual bool OnMessageReceived(const IPC::Message& message, | |
33 bool* message_was_ok) OVERRIDE; | |
34 virtual void OverrideThreadForMessage( | |
35 const IPC::Message& message, | |
36 content::BrowserThread::ID* thread) OVERRIDE; | |
mmenke
2012/05/01 16:23:21
Any reason why these functions are public?
gavinp
2012/05/01 18:50:22
None, so I fixed it. The convention is for them t
gavinp
2012/05/01 18:50:22
No, none. Fixed.
The convention in Chrome is for
mmenke
2012/05/02 15:02:52
Indeed. I wouldn't have commented, if OnChannelCl
| |
37 | |
38 private: | |
39 virtual ~PrerenderMessageFilter(); | |
40 | |
41 void OnAddPrerender(int prerender_id, | |
42 const GURL& url, | |
43 const content::Referrer& referrer, | |
44 const gfx::Size& size, | |
45 int render_view_route_id); | |
46 void OnCancelPrerender(int prerender_id); | |
47 void OnAbandonPrerender(int prerender_id); | |
48 virtual void OnChannelClosing() OVERRIDE; | |
mmenke
2012/05/01 16:23:21
nit: Should have a comment that the OVERRIDE func
gavinp
2012/05/01 18:50:22
Done.
| |
49 | |
50 const int render_process_id_; | |
51 Profile* const profile_; | |
52 | |
53 DISALLOW_COPY_AND_ASSIGN(PrerenderMessageFilter); | |
54 }; | |
55 | |
56 } // namespace prerender | |
57 | |
58 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MESSAGE_FILTER_H_ | |
59 | |
OLD | NEW |