1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/browser_dialogs.h"
6 #include "chrome/browser/ui/cocoa/about_ipc_controller.h"
7 #include "chrome/browser/ui/cocoa/about_ipc_dialog.h"
9 #if defined(IPC_MESSAGE_LOG_ENABLED)
13 void ShowAboutIPCDialog() {
14 // The controller gets deallocated when then window is closed,
15 // so it is safe to "fire and forget".
16 AboutIPCController* controller = [AboutIPCController sharedController];
17 [[controller window] makeKeyAndOrderFront:controller];
22 void AboutIPCBridge::Log(const IPC::LogData& data) {
23 CocoaLogData* cocoa_data = [[CocoaLogData alloc] initWithLogData:data];
24 if ([NSThread isMainThread]) {
25 [controller_ log:cocoa_data];
27 [controller_ performSelectorOnMainThread:@selector(log:)
33 #endif // IPC_MESSAGE_LOG_ENABLED