| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_ |
| 6 #define CHROME_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // This class filters out incoming printing related IPC messages for the | 36 // This class filters out incoming printing related IPC messages for the |
| 37 // renderer process on the IPC thread. | 37 // renderer process on the IPC thread. |
| 38 class PrintingMessageFilter : public content::BrowserMessageFilter { | 38 class PrintingMessageFilter : public content::BrowserMessageFilter { |
| 39 public: | 39 public: |
| 40 PrintingMessageFilter(int render_process_id, Profile* profile); | 40 PrintingMessageFilter(int render_process_id, Profile* profile); |
| 41 | 41 |
| 42 // content::BrowserMessageFilter methods. | 42 // content::BrowserMessageFilter methods. |
| 43 virtual void OverrideThreadForMessage( | 43 virtual void OverrideThreadForMessage( |
| 44 const IPC::Message& message, | 44 const IPC::Message& message, |
| 45 content::BrowserThread::ID* thread) OVERRIDE; | 45 content::BrowserThread::ID* thread) OVERRIDE; |
| 46 virtual bool OnMessageReceived(const IPC::Message& message, | 46 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 47 bool* message_was_ok) OVERRIDE; | |
| 48 | 47 |
| 49 private: | 48 private: |
| 50 virtual ~PrintingMessageFilter(); | 49 virtual ~PrintingMessageFilter(); |
| 51 | 50 |
| 52 #if defined(OS_WIN) | 51 #if defined(OS_WIN) |
| 53 // Used to pass resulting EMF from renderer to browser in printing. | 52 // Used to pass resulting EMF from renderer to browser in printing. |
| 54 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, | 53 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, |
| 55 base::SharedMemoryHandle* browser_handle); | 54 base::SharedMemoryHandle* browser_handle); |
| 56 #endif | 55 #endif |
| 57 | 56 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 ProfileIOData* profile_io_data_; | 133 ProfileIOData* profile_io_data_; |
| 135 | 134 |
| 136 const int render_process_id_; | 135 const int render_process_id_; |
| 137 | 136 |
| 138 scoped_refptr<printing::PrintQueriesQueue> queue_; | 137 scoped_refptr<printing::PrintQueriesQueue> queue_; |
| 139 | 138 |
| 140 DISALLOW_COPY_AND_ASSIGN(PrintingMessageFilter); | 139 DISALLOW_COPY_AND_ASSIGN(PrintingMessageFilter); |
| 141 }; | 140 }; |
| 142 | 141 |
| 143 #endif // CHROME_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_ | 142 #endif // CHROME_BROWSER_PRINTING_PRINTING_MESSAGE_FILTER_H_ |
| OLD | NEW |