| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_NACL_BROWSER_NACL_HOST_MESSAGE_FILTER_H_ | 5 #ifndef COMPONENTS_NACL_BROWSER_NACL_HOST_MESSAGE_FILTER_H_ |
| 6 #define COMPONENTS_NACL_BROWSER_NACL_HOST_MESSAGE_FILTER_H_ | 6 #define COMPONENTS_NACL_BROWSER_NACL_HOST_MESSAGE_FILTER_H_ |
| 7 | 7 |
| 8 #include "base/files/file.h" | 8 #include "base/files/file.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // This class filters out incoming Chrome-specific IPC messages for the renderer | 27 // This class filters out incoming Chrome-specific IPC messages for the renderer |
| 28 // process on the IPC thread. | 28 // process on the IPC thread. |
| 29 class NaClHostMessageFilter : public content::BrowserMessageFilter { | 29 class NaClHostMessageFilter : public content::BrowserMessageFilter { |
| 30 public: | 30 public: |
| 31 NaClHostMessageFilter(int render_process_id, | 31 NaClHostMessageFilter(int render_process_id, |
| 32 bool is_off_the_record, | 32 bool is_off_the_record, |
| 33 const base::FilePath& profile_directory, | 33 const base::FilePath& profile_directory, |
| 34 net::URLRequestContextGetter* request_context); | 34 net::URLRequestContextGetter* request_context); |
| 35 | 35 |
| 36 // content::BrowserMessageFilter methods: | 36 // content::BrowserMessageFilter methods: |
| 37 virtual bool OnMessageReceived(const IPC::Message& message, | 37 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 38 bool* message_was_ok) OVERRIDE; | |
| 39 virtual void OnChannelClosing() OVERRIDE; | 38 virtual void OnChannelClosing() OVERRIDE; |
| 40 | 39 |
| 41 int render_process_id() { return render_process_id_; } | 40 int render_process_id() { return render_process_id_; } |
| 42 bool off_the_record() { return off_the_record_; } | 41 bool off_the_record() { return off_the_record_; } |
| 43 const base::FilePath& profile_directory() const { return profile_directory_; } | 42 const base::FilePath& profile_directory() const { return profile_directory_; } |
| 44 net::HostResolver* GetHostResolver(); | 43 net::HostResolver* GetHostResolver(); |
| 45 | 44 |
| 46 private: | 45 private: |
| 47 friend class content::BrowserThread; | 46 friend class content::BrowserThread; |
| 48 friend class base::DeleteHelper<NaClHostMessageFilter>; | 47 friend class base::DeleteHelper<NaClHostMessageFilter>; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 79 scoped_refptr<net::URLRequestContextGetter> request_context_; | 78 scoped_refptr<net::URLRequestContextGetter> request_context_; |
| 80 | 79 |
| 81 base::WeakPtrFactory<NaClHostMessageFilter> weak_ptr_factory_; | 80 base::WeakPtrFactory<NaClHostMessageFilter> weak_ptr_factory_; |
| 82 | 81 |
| 83 DISALLOW_COPY_AND_ASSIGN(NaClHostMessageFilter); | 82 DISALLOW_COPY_AND_ASSIGN(NaClHostMessageFilter); |
| 84 }; | 83 }; |
| 85 | 84 |
| 86 } // namespace nacl | 85 } // namespace nacl |
| 87 | 86 |
| 88 #endif // COMPONENTS_NACL_BROWSER_NACL_HOST_MESSAGE_FILTER_H_ | 87 #endif // COMPONENTS_NACL_BROWSER_NACL_HOST_MESSAGE_FILTER_H_ |
| OLD | NEW |