| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_COMMON_IPC_LOGGING_H_ | 5 #ifndef CHROME_COMMON_IPC_LOGGING_H_ |
| 6 #define CHROME_COMMON_IPC_LOGGING_H_ | 6 #define CHROME_COMMON_IPC_LOGGING_H_ |
| 7 | 7 |
| 8 #include "chrome/common/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. | 8 #include "chrome/common/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. |
| 9 | 9 |
| 10 #ifdef IPC_MESSAGE_LOG_ENABLED | 10 #ifdef IPC_MESSAGE_LOG_ENABLED |
| 11 | 11 |
| 12 #include "base/lock.h" | 12 #include <vector> |
| 13 |
| 13 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 15 #include "base/scoped_ptr.h" |
| 14 #include "base/singleton.h" | 16 #include "base/singleton.h" |
| 15 #include "base/waitable_event_watcher.h" | 17 #include "base/waitable_event_watcher.h" |
| 16 #include "chrome/common/ipc_message_utils.h" | |
| 17 | |
| 18 class MessageLoop; | |
| 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 : public base::WaitableEventWatcher::Delegate, | 26 class Logging : public base::WaitableEventWatcher::Delegate, |
| 28 public MessageLoop::DestructionObserver { | 27 public MessageLoop::DestructionObserver { |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 Consumer* consumer_; | 103 Consumer* consumer_; |
| 105 | 104 |
| 106 static LogFunction *log_function_mapping_; | 105 static LogFunction *log_function_mapping_; |
| 107 }; | 106 }; |
| 108 | 107 |
| 109 } // namespace IPC | 108 } // namespace IPC |
| 110 | 109 |
| 111 #endif // IPC_MESSAGE_LOG_ENABLED | 110 #endif // IPC_MESSAGE_LOG_ENABLED |
| 112 | 111 |
| 113 #endif // CHROME_COMMON_IPC_LOGGING_H_ | 112 #endif // CHROME_COMMON_IPC_LOGGING_H_ |
| OLD | NEW |