summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/about_ipc_dialog.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 17:47:07 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-03 17:47:07 +0000
commitf56f0bf3d4ead673b49ba29123386c8302f3fcb0 (patch)
tree55594e76ce52db17e3579d547346b143fdad69d7 /chrome/browser/views/about_ipc_dialog.h
parent6c1495cfeac8fbe96263db768c2cf7dadea5993d (diff)
downloadchromium_src-f56f0bf3d4ead673b49ba29123386c8302f3fcb0.zip
chromium_src-f56f0bf3d4ead673b49ba29123386c8302f3fcb0.tar.gz
chromium_src-f56f0bf3d4ead673b49ba29123386c8302f3fcb0.tar.bz2
Move the about:ipc tab to a dialog. This patch is kind of a hack, the Windows
specific code for the settings dialog and the table view are just copied from the old dialog. I tried to change as little as possible. The only significant change should be that I commented out saving the settings in the profile. Review URL: http://codereview.chromium.org/19741 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9090 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/about_ipc_dialog.h')
-rw-r--r--chrome/browser/views/about_ipc_dialog.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/chrome/browser/views/about_ipc_dialog.h b/chrome/browser/views/about_ipc_dialog.h
new file mode 100644
index 0000000..969c3c09
--- /dev/null
+++ b/chrome/browser/views/about_ipc_dialog.h
@@ -0,0 +1,78 @@
+// Copyright (c) 2009 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.
+
+#ifndef CHROME_BROWSER_VIEWS_ABOUT_IPC_DIALOG_H_
+#define CHROME_BROWSER_VIEWS_ABOUT_IPC_DIALOG_H_
+
+#include <atlbase.h>
+#include <atlapp.h>
+#include <atlcrack.h>
+#include <atlctrls.h>
+#include <atlmisc.h>
+
+#include "base/singleton.h"
+#include "chrome/common/ipc_logging.h"
+#include "chrome/views/base_button.h"
+#include "chrome/views/dialog_delegate.h"
+#include "chrome/views/table_view.h"
+
+#if defined(OS_WIN)
+
+class Profile;
+namespace views {
+class TextButton;
+class HWNDView;
+} // namespace views
+
+class AboutIPCDialog : public views::DialogDelegate,
+ public views::BaseButton::ButtonListener,
+ public IPC::Logging::Consumer,
+ public views::View {
+ public:
+ // This 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.
+ static void RunDialog();
+
+ virtual ~AboutIPCDialog();
+
+ private:
+ friend struct DefaultSingletonTraits<AboutIPCDialog>;
+
+ AboutIPCDialog();
+
+ // Sets up all UI controls for the dialog.
+ void SetupControls();
+
+ // views::View overrides.
+ virtual gfx::Size GetPreferredSize();
+ virtual views::View* GetContentsView();
+ virtual int GetDialogButtons() const;
+ virtual std::wstring GetWindowTitle() const;
+ virtual void Layout();
+
+ // IPC::Logging::Consumer implementation.
+ virtual void Log(const IPC::LogData& data);
+
+ // views::WindowDelegate (via view::DialogDelegate).
+ virtual bool CanResize() const;
+
+ // views::BaseButton::ButtonListener.
+ virtual void ButtonPressed(views::BaseButton* button);
+
+ CListViewCtrl message_list_;
+
+ views::TextButton* track_toggle_;
+ views::TextButton* clear_button_;
+ views::TextButton* filter_button_;
+ views::HWNDView* table_;
+
+ // Set to true when we're tracking network status.
+ bool tracking_;
+
+ DISALLOW_COPY_AND_ASSIGN(AboutIPCDialog);
+};
+
+#endif
+
+#endif // CHROME_BROWSER_VIEWS_ABOUT_IPC_DIALOG_H_