OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // Need to include this before any other file because it defines | 5 // Need to include this before any other file because it defines |
6 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define | 6 // IPC_MESSAGE_LOG_ENABLED. We need to use it to define |
7 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the | 7 // IPC_MESSAGE_MACROS_LOG_ENABLED so render_messages.h will generate the |
8 // ViewMsgLog et al. functions. | 8 // ViewMsgLog et al. functions. |
9 #include "ipc/ipc_message.h" | 9 #include "ipc/ipc_message.h" |
10 | 10 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 196 |
197 // AboutIPCDialog -------------------------------------------------------------- | 197 // AboutIPCDialog -------------------------------------------------------------- |
198 | 198 |
199 AboutIPCDialog::AboutIPCDialog() | 199 AboutIPCDialog::AboutIPCDialog() |
200 : track_toggle_(NULL), | 200 : track_toggle_(NULL), |
201 clear_button_(NULL), | 201 clear_button_(NULL), |
202 filter_button_(NULL), | 202 filter_button_(NULL), |
203 table_(NULL), | 203 table_(NULL), |
204 tracking_(false) { | 204 tracking_(false) { |
205 SetupControls(); | 205 SetupControls(); |
206 IPC::Logging::current()->SetConsumer(this); | 206 IPC::Logging::GetInstance()->SetConsumer(this); |
207 } | 207 } |
208 | 208 |
209 AboutIPCDialog::~AboutIPCDialog() { | 209 AboutIPCDialog::~AboutIPCDialog() { |
210 active_dialog = NULL; | 210 active_dialog = NULL; |
211 IPC::Logging::current()->SetConsumer(NULL); | 211 IPC::Logging::GetInstance()->SetConsumer(NULL); |
212 } | 212 } |
213 | 213 |
214 // static | 214 // static |
215 void AboutIPCDialog::RunDialog() { | 215 void AboutIPCDialog::RunDialog() { |
216 if (!active_dialog) { | 216 if (!active_dialog) { |
217 active_dialog = new AboutIPCDialog; | 217 active_dialog = new AboutIPCDialog; |
218 views::Window::CreateChromeWindow(NULL, gfx::Rect(), active_dialog)->Show(); | 218 views::Window::CreateChromeWindow(NULL, gfx::Rect(), active_dialog)->Show(); |
219 } else { | 219 } else { |
220 // TOOD(brettw) it would be nice to focus the existing window. | 220 // TOOD(brettw) it would be nice to focus the existing window. |
221 } | 221 } |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 } | 361 } |
362 track_toggle_->SchedulePaint(); | 362 track_toggle_->SchedulePaint(); |
363 } else if (button == clear_button_) { | 363 } else if (button == clear_button_) { |
364 message_list_.DeleteAllItems(); | 364 message_list_.DeleteAllItems(); |
365 } else if (button == filter_button_) { | 365 } else if (button == filter_button_) { |
366 RunSettingsDialog(GetRootView()->GetWidget()->GetNativeView()); | 366 RunSettingsDialog(GetRootView()->GetWidget()->GetNativeView()); |
367 } | 367 } |
368 } | 368 } |
369 | 369 |
370 #endif // IPC_MESSAGE_LOG_ENABLED | 370 #endif // IPC_MESSAGE_LOG_ENABLED |
OLD | NEW |