summaryrefslogtreecommitdiffstats
path: root/chrome_frame/find_dialog.h
diff options
context:
space:
mode:
authorslightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 05:11:58 +0000
committerslightlyoff@chromium.org <slightlyoff@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-24 05:11:58 +0000
commitf781782dd67077478e117c61dca4ea5eefce3544 (patch)
tree4801f724123cfdcbb69c4e7fe40a565b331723ae /chrome_frame/find_dialog.h
parent63cf4759efa2373e33436fb5df6849f930081226 (diff)
downloadchromium_src-f781782dd67077478e117c61dca4ea5eefce3544.zip
chromium_src-f781782dd67077478e117c61dca4ea5eefce3544.tar.gz
chromium_src-f781782dd67077478e117c61dca4ea5eefce3544.tar.bz2
Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming in a separate CL.
BUG=None TEST=None Review URL: http://codereview.chromium.org/218019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/find_dialog.h')
-rw-r--r--chrome_frame/find_dialog.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/chrome_frame/find_dialog.h b/chrome_frame/find_dialog.h
new file mode 100644
index 0000000..9e7cafe
--- /dev/null
+++ b/chrome_frame/find_dialog.h
@@ -0,0 +1,54 @@
+// 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_FRAME_FIND_DIALOG_H_
+#define CHROME_FRAME_FIND_DIALOG_H_
+
+#include <atlbase.h>
+#include <atlwin.h>
+
+#include "base/ref_counted.h"
+#include "resource.h"
+#include "grit/chrome_frame_resources.h"
+
+class ChromeFrameAutomationClient;
+
+class CFFindDialog : public CDialogImpl<CFFindDialog> {
+ public:
+ enum { IDD = IDD_FIND_DIALOG };
+
+ BEGIN_MSG_MAP(CFFindDialog)
+ MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
+ MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
+ COMMAND_ID_HANDLER(IDOK, OnFind)
+ COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
+ END_MSG_MAP()
+
+ CFFindDialog();
+ void Init(ChromeFrameAutomationClient* automation_client);
+
+ LRESULT OnDestroy(UINT msg, WPARAM wparam,
+ LPARAM lparam, BOOL& handled); // NOLINT
+ LRESULT OnFind(WORD wNotifyCode, WORD wID,
+ HWND hWndCtl, BOOL& bHandled); // NOLINT
+ LRESULT OnCancel(WORD wNotifyCode, WORD wID,
+ HWND hWndCtl, BOOL& bHandled); // NOLINT
+ LRESULT OnInitDialog(UINT msg, WPARAM wparam,
+ LPARAM lparam, BOOL& handled); // NOLINT
+
+ private:
+
+ // Since the message loop we expect to run in isn't going to be nicely
+ // calling IsDialogMessage(), we need to hook the wnd proc and call it
+ // ourselves. See http://support.microsoft.com/kb/q187988/
+ bool InstallMessageHook();
+ bool UninstallMessageHook();
+ static LRESULT CALLBACK GetMsgProc(int code, WPARAM wparam, LPARAM lparam);
+ static HHOOK msg_hook_;
+
+ // We don't own these, and they must exist at least as long as we do.
+ ChromeFrameAutomationClient* automation_client_;
+};
+
+#endif // CHROME_FRAME_FIND_DIALOG_H_