Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(855)

Unified Diff: chrome/browser/ui/cocoa/about_ipc_dialog.h

Issue 6265015: [Mac] Merge single-function file about_ipc_dialog.{h,mm} into about_ipc_bridge.{h,mm}. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/about_ipc_controller.h ('k') | chrome/browser/ui/cocoa/about_ipc_dialog.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/about_ipc_dialog.h
diff --git a/chrome/browser/ui/cocoa/about_ipc_dialog.h b/chrome/browser/ui/cocoa/about_ipc_dialog.h
index 3eb2bcd278df9d34c336eb5c60d8dcb4b43a6060..7755580183f8a6de87f424e512f945eaa2ff95f5 100644
--- a/chrome/browser/ui/cocoa/about_ipc_dialog.h
+++ b/chrome/browser/ui/cocoa/about_ipc_dialog.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -6,19 +6,40 @@
#define CHROME_BROWSER_UI_COCOA_ABOUT_IPC_DIALOG_H_
#pragma once
-#include "ipc/ipc_message.h"
+#include "ipc/ipc_logging.h"
+#include "ipc/ipc_message_utils.h"
#if defined(IPC_MESSAGE_LOG_ENABLED)
+#ifdef __OBJC__
+@class AboutIPCController;
+#else
+class AboutIPCController;
+#endif
+
namespace AboutIPCDialog {
// The dialog is a singleton. If the dialog is already opened, it won't do
// anything, so you can just blindly call this function all you want.
// RunDialog() is Called from chrome/browser/browser_about_handler.cc
// in response to an about:ipc URL.
void RunDialog();
-};
+}
+
+// On Windows, the AboutIPCDialog is a views::View. On Mac we have a
+// Cocoa dialog. This class bridges from C++ to ObjC.
+class AboutIPCBridge : public IPC::Logging::Consumer {
+ public:
+ AboutIPCBridge(AboutIPCController* controller) : controller_(controller) { }
+ virtual ~AboutIPCBridge() { }
+ // IPC::Logging::Consumer implementation.
+ virtual void Log(const IPC::LogData& data);
+
+ private:
+ AboutIPCController* controller_; // weak; owns me
+ DISALLOW_COPY_AND_ASSIGN(AboutIPCBridge);
+};
-#endif /* IPC_MESSAGE_LOG_ENABLED */
+#endif // IPC_MESSAGE_LOG_ENABLED
-#endif /* CHROME_BROWSER_UI_COCOA_ABOUT_IPC_DIALOG_H_ */
+#endif // CHROME_BROWSER_UI_COCOA_ABOUT_IPC_DIALOG_H_
« no previous file with comments | « chrome/browser/ui/cocoa/about_ipc_controller.h ('k') | chrome/browser/ui/cocoa/about_ipc_dialog.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698