| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. | 10 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 bool Enabled() const { return enabled_; } | 60 bool Enabled() const { return enabled_; } |
| 61 | 61 |
| 62 // Called by child processes to give the logger object the channel to send | 62 // Called by child processes to give the logger object the channel to send |
| 63 // logging data to the browser process. | 63 // logging data to the browser process. |
| 64 void SetIPCSender(Sender* sender); | 64 void SetIPCSender(Sender* sender); |
| 65 | 65 |
| 66 // Called in the browser process when logging data from a child process is | 66 // Called in the browser process when logging data from a child process is |
| 67 // received. | 67 // received. |
| 68 void OnReceivedLoggingMessage(const Message& message); | 68 void OnReceivedLoggingMessage(const Message& message); |
| 69 | 69 |
| 70 void OnSendMessage(Message* message, const std::string& channel_id); | 70 void OnSendMessage(Message* message); |
| 71 void OnPreDispatchMessage(const Message& message); | 71 void OnPreDispatchMessage(const Message& message); |
| 72 void OnPostDispatchMessage(const Message& message, | 72 void OnPostDispatchMessage(const Message& message); |
| 73 const std::string& channel_id); | |
| 74 | 73 |
| 75 // Like the *MsgLog functions declared for each message class, except this | 74 // Like the *MsgLog functions declared for each message class, except this |
| 76 // calls the correct one based on the message type automatically. Defined in | 75 // calls the correct one based on the message type automatically. Defined in |
| 77 // ipc_logging.cc. | 76 // ipc_logging.cc. |
| 78 static void GetMessageText(uint32_t type, std::string* name, | 77 static void GetMessageText(uint32_t type, std::string* name, |
| 79 const Message* message, std::string* params); | 78 const Message* message, std::string* params); |
| 80 | 79 |
| 81 static void set_log_function_map(LogFunctionMap* functions) { | 80 static void set_log_function_map(LogFunctionMap* functions) { |
| 82 log_function_map_ = functions; | 81 log_function_map_ = functions; |
| 83 } | 82 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 Consumer* consumer_; | 119 Consumer* consumer_; |
| 121 | 120 |
| 122 static LogFunctionMap* log_function_map_; | 121 static LogFunctionMap* log_function_map_; |
| 123 }; | 122 }; |
| 124 | 123 |
| 125 } // namespace IPC | 124 } // namespace IPC |
| 126 | 125 |
| 127 #endif // IPC_MESSAGE_LOG_ENABLED | 126 #endif // IPC_MESSAGE_LOG_ENABLED |
| 128 | 127 |
| 129 #endif // IPC_IPC_LOGGING_H_ | 128 #endif // IPC_IPC_LOGGING_H_ |
| OLD | NEW |