| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 IPC_IPC_LOGGING_H_ | 5 #ifndef IPC_IPC_LOGGING_H_ |
| 6 #define IPC_IPC_LOGGING_H_ | 6 #define IPC_IPC_LOGGING_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. | 9 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. |
| 10 | 10 |
| 11 #ifdef IPC_MESSAGE_LOG_ENABLED | 11 #ifdef IPC_MESSAGE_LOG_ENABLED |
| 12 | 12 |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
| 16 #include "base/scoped_ptr.h" | 16 #include "base/scoped_ptr.h" |
| 17 #include "base/singleton.h" | 17 #include "base/singleton.h" |
| 18 #include "base/waitable_event_watcher.h" | |
| 19 | 18 |
| 20 namespace IPC { | 19 namespace IPC { |
| 21 | 20 |
| 22 class Message; | 21 class Message; |
| 23 | 22 |
| 24 // One instance per process. Needs to be created on the main thread (the UI | 23 // One instance per process. Needs to be created on the main thread (the UI |
| 25 // thread in the browser) but OnPreDispatchMessage/OnPostDispatchMessage | 24 // thread in the browser) but OnPreDispatchMessage/OnPostDispatchMessage |
| 26 // can be called on other threads. | 25 // can be called on other threads. |
| 27 class Logging { | 26 class Logging { |
| 28 public: | 27 public: |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 Consumer* consumer_; | 97 Consumer* consumer_; |
| 99 | 98 |
| 100 static LogFunction *log_function_mapping_; | 99 static LogFunction *log_function_mapping_; |
| 101 }; | 100 }; |
| 102 | 101 |
| 103 } // namespace IPC | 102 } // namespace IPC |
| 104 | 103 |
| 105 #endif // IPC_MESSAGE_LOG_ENABLED | 104 #endif // IPC_MESSAGE_LOG_ENABLED |
| 106 | 105 |
| 107 #endif // IPC_IPC_LOGGING_H_ | 106 #endif // IPC_IPC_LOGGING_H_ |
| OLD | NEW |