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

Unified Diff: base/win/text_services_bridge.h

Issue 10826223: Replace PeekMessage for TSF awareness (Closed) Base URL: http://git.chromium.org/chromium/src.git@yukawa
Patch Set: add comments Created 8 years, 4 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_bridge.h
diff --git a/base/win/text_services_bridge.h b/base/win/text_services_bridge.h
new file mode 100755
index 0000000000000000000000000000000000000000..cd3ee2a49157863857fa515e8675e4c064b8cb5d
--- /dev/null
+++ b/base/win/text_services_bridge.h
@@ -0,0 +1,46 @@
+// 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_BRIDGE_H_
+#define BASE_WIN_TEXT_SERVICES_BRIDGE_H_
+
+#include <msctf.h>
+#include <Windows.h>
+
+#include "base/memory/scoped_ptr.h"
+#include "base/win/metro.h"
+#include "base/win/scoped_com_initializer.h"
+#include "base/win/scoped_comptr.h"
+#include "base/message_pump_win.h"
+
+namespace base {
+namespace win {
+
+class TextServicesBridge : public base::MessagePumpForUI::MessageFilter {
cpu_(ooo_6.6-7.5) 2012/08/22 21:37:18 name it TextServicesMessageFilter or something lik
+ public:
+ TextServicesBridge();
+ virtual ~TextServicesBridge();
+ virtual bool Init() OVERRIDE;
+ virtual BOOL DoPeekMessage(MSG* message,
+ HWND hwnd,
+ 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::ScopedCOMInitializer scoped_com_initialiser_;
cpu_(ooo_6.6-7.5) 2012/08/22 21:37:18 see my comment about COM in the cc file
+ base::win::ScopedComPtr<ITfThreadMgr> thread_mgr_;
+ base::win::ScopedComPtr<ITfMessagePump> message_pump_;
+ base::win::ScopedComPtr<ITfKeystrokeMgr> keystroke_mgr_;
+
+ DISALLOW_COPY_AND_ASSIGN(TextServicesBridge);
+};
+
+} // namespace win
+} // namespace base
+
+#endif // BASE_WIN_TEXT_SERVICES_BRIDGE_H_

Powered by Google App Engine
This is Rietveld 408576698