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

Unified Diff: base/win/text_services_message_filter.h

Issue 10826223: Replace PeekMessage for TSF awareness (Closed) Base URL: http://git.chromium.org/chromium/src.git@yukawa
Patch Set: check MessageFilter::Init() out of DCHECK Created 8 years, 3 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
Index: base/win/text_services_message_filter.h
diff --git a/base/win/text_services_message_filter.h b/base/win/text_services_message_filter.h
new file mode 100755
index 0000000000000000000000000000000000000000..43f6807f2b9d5a57f452b08be88d181614026d6d
--- /dev/null
+++ b/base/win/text_services_message_filter.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2012 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 BASE_WIN_TEXT_SERVICES_MESSAGE_FILTER_H_
+#define BASE_WIN_TEXT_SERVICES_MESSAGE_FILTER_H_
+
+#include <msctf.h>
+#include <Windows.h>
+
+#include "base/memory/scoped_ptr.h"
+#include "base/message_pump_win.h"
+#include "base/win/metro.h"
+#include "base/win/scoped_comptr.h"
+
+namespace base {
+namespace win {
+
+class BASE_EXPORT TextServicesMessageFilter
+ : public base::MessagePumpForUI::MessageFilter {
+ public:
+ TextServicesMessageFilter();
+ virtual ~TextServicesMessageFilter();
+ virtual bool Init() OVERRIDE;
+ virtual BOOL DoPeekMessage(MSG* message,
+ HWND window_handle,
+ UINT msg_filter_min,
+ UINT msg_filter_max,
+ UINT remove_msg) OVERRIDE;
+ virtual bool ProcessMessage(const MSG& message) OVERRIDE;
+
+ private:
+ TfClientId client_id_;
+ bool is_initialized_;
+ base::win::ScopedComPtr<ITfThreadMgr> thread_mgr_;
+ base::win::ScopedComPtr<ITfMessagePump> message_pump_;
+ base::win::ScopedComPtr<ITfKeystrokeMgr> keystroke_mgr_;
+
+ DISALLOW_COPY_AND_ASSIGN(TextServicesMessageFilter);
+};
+
+} // namespace win
+} // namespace base
+
+#endif // BASE_WIN_TEXT_SERVICES_MESSAGE_FILTER_H_

Powered by Google App Engine
This is Rietveld 408576698