| 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 CHROME_BROWSER_UI_COCOA_ABOUT_IPC_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_ABOUT_IPC_DIALOG_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_ABOUT_IPC_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_COCOA_ABOUT_IPC_DIALOG_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ipc/ipc_logging.h" | 9 #include "ipc/ipc_logging.h" |
| 10 #include "ipc/ipc_message_utils.h" | 10 #include "ipc/ipc_message_utils.h" |
| 11 | 11 |
| 12 #if defined(IPC_MESSAGE_LOG_ENABLED) | 12 #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 13 | 13 |
| 14 #ifdef __OBJC__ | 14 #ifdef __OBJC__ |
| 15 @class AboutIPCController; | 15 @class AboutIPCController; |
| 16 #else | 16 #else |
| 17 class AboutIPCController; | 17 class AboutIPCController; |
| 18 #endif | 18 #endif |
| 19 | 19 |
| 20 | 20 |
| 21 // On Windows, the AboutIPCDialog is a views::View. On Mac we have a | 21 // On Windows, the AboutIPCDialog is a views::View. On Mac we have a |
| 22 // Cocoa dialog. This class bridges from C++ to ObjC. | 22 // Cocoa dialog. This class bridges from C++ to ObjC. |
| 23 class AboutIPCBridge : public IPC::Logging::Consumer { | 23 class AboutIPCBridge : public IPC::Logging::Consumer { |
| 24 public: | 24 public: |
| 25 AboutIPCBridge(AboutIPCController* controller) : controller_(controller) { } | 25 AboutIPCBridge(AboutIPCController* controller) : controller_(controller) { } |
| 26 virtual ~AboutIPCBridge() { } | 26 virtual ~AboutIPCBridge() { } |
| 27 | 27 |
| 28 // IPC::Logging::Consumer implementation. | 28 // IPC::Logging::Consumer implementation. |
| 29 virtual void Log(const IPC::LogData& data); | 29 virtual void Log(const IPC::LogData& data) OVERRIDE; |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 AboutIPCController* controller_; // weak; owns me | 32 AboutIPCController* controller_; // weak; owns me |
| 33 DISALLOW_COPY_AND_ASSIGN(AboutIPCBridge); | 33 DISALLOW_COPY_AND_ASSIGN(AboutIPCBridge); |
| 34 }; | 34 }; |
| 35 | 35 |
| 36 #endif // IPC_MESSAGE_LOG_ENABLED | 36 #endif // IPC_MESSAGE_LOG_ENABLED |
| 37 | 37 |
| 38 #endif // CHROME_BROWSER_UI_COCOA_ABOUT_IPC_DIALOG_H_ | 38 #endif // CHROME_BROWSER_UI_COCOA_ABOUT_IPC_DIALOG_H_ |
| OLD | NEW |