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

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: nitpick 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
« no previous file with comments | « base/message_pump_win.cc ('k') | base/win/text_services_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2de8496ff9a0b9ec8be39529a226fa14e1bf5c5e
--- /dev/null
+++ b/base/win/text_services_message_filter.h
@@ -0,0 +1,48 @@
+// 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 {
+
+// TextServicesMessageFilter extends MessageFilter with methods that are using
+// Text Services Framework COM component.
+class BASE_EXPORT TextServicesMessageFilter
+ : public base::MessagePumpForUI::MessageFilter {
+ public:
+ TextServicesMessageFilter();
+ virtual ~TextServicesMessageFilter();
+ virtual BOOL DoPeekMessage(MSG* msg,
+ HWND window_handle,
+ UINT msg_filter_min,
+ UINT msg_filter_max,
+ UINT remove_msg) OVERRIDE;
+ virtual bool ProcessMessage(const MSG& msg) OVERRIDE;
+
+ bool Init();
+
+ 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_
« no previous file with comments | « base/message_pump_win.cc ('k') | base/win/text_services_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698