Chromium Code Reviews| 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" | |
| 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() { } | |
|
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.
| |
| 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 | |
|
cbentzel
2012/04/24 15:42:59
Nit: Remove extra newline.
gavinp
2012/04/26 23:55:39
Done.
| |
| 51 | |
| 52 const int render_process_id_; | |
| 53 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
| |
| 54 | |
| 55 DISALLOW_COPY_AND_ASSIGN(PrerenderMessageFilter); | |
| 56 }; | |
| 57 | |
| 58 } | |
| 59 | |
| 60 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MESSAGE_FILTER_H_ | |
| OLD | NEW |