Commit 0b15dad9 authored by scottmg@chromium.org's avatar scottmg@chromium.org

Remove InputMethodTSF, TSFEventRouter, TSFTextStore, TSFBridge

My understanding is that these are now unnecessary. Hopefully I
haven't removed too much here.

TBR=ben@chromium.org
R=yukawa@chromium.org
BUG=319122, 5027, 330735

Review URL: https://codereview.chromium.org/149073009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248001 0039d316-1c4b-4281-b951-d872f2087c98
parent e0dfae2d
......@@ -45,8 +45,6 @@
'input_method_minimal.cc',
'input_method_minimal.h',
'input_method_observer.h',
'input_method_tsf.cc',
'input_method_tsf.h',
'input_method_win.cc',
'input_method_win.h',
'linux/fake_input_method_context.cc',
......@@ -66,14 +64,8 @@
'text_input_type.h',
'win/imm32_manager.cc',
'win/imm32_manager.h',
'win/tsf_bridge.cc',
'win/tsf_bridge.h',
'win/tsf_event_router.cc',
'win/tsf_event_router.h',
'win/tsf_input_scope.cc',
'win/tsf_input_scope.h',
'win/tsf_text_store.cc',
'win/tsf_text_store.h',
],
'conditions': [
['toolkit_views==0 and use_aura==0', {
......@@ -99,8 +91,6 @@
'sources!': [
'input_method_imm32.cc',
'input_method_imm32.h',
'input_method_tsf.cc',
'input_method_tsf.h',
],
}],
['use_aura==0 or (desktop_linux==0 and use_ozone==0)', {
......
......@@ -8,15 +8,5 @@
'dummy_input_method.h',
'dummy_text_input_client.cc',
'dummy_text_input_client.h',
'win/mock_tsf_bridge.cc',
'win/mock_tsf_bridge.h',
],
'conditions': [
['OS!="win"', {
'sources!': [
'win/mock_tsf_bridge.cc',
'win/mock_tsf_bridge.h',
],
}],
],
}
......@@ -12,7 +12,6 @@
'remote_input_method_win_unittest.cc',
'win/imm32_manager_unittest.cc',
'win/tsf_input_scope_unittest.cc',
'win/tsf_text_store_unittest.cc',
],
'conditions': [
['chromeos==0 or use_x11==0', {
......
......@@ -11,7 +11,6 @@
#elif defined(OS_WIN)
#include "base/win/metro.h"
#include "ui/base/ime/input_method_imm32.h"
#include "ui/base/ime/input_method_tsf.h"
#include "ui/base/ime/remote_input_method_win.h"
#elif defined(USE_AURA) && defined(OS_LINUX)
#include "ui/base/ime/input_method_auralinux.h"
......@@ -45,8 +44,6 @@ scoped_ptr<InputMethod> CreateInputMethod(
#if defined(OS_CHROMEOS) && defined(USE_X11)
return scoped_ptr<InputMethod>(new InputMethodChromeOS(delegate));
#elif defined(OS_WIN)
if (base::win::IsTSFAwareRequired())
return scoped_ptr<InputMethod>(new InputMethodTSF(delegate, widget));
if (IsRemoteInputMethodWinRequired(widget))
return CreateRemoteInputMethodWin(delegate);
return scoped_ptr<InputMethod>(new InputMethodIMM32(delegate, widget));
......
......@@ -12,7 +12,6 @@
#elif defined(OS_WIN)
#include "base/win/metro.h"
#include "ui/base/ime/input_method_factory.h"
#include "ui/base/ime/win/tsf_bridge.h"
#endif
namespace {
......@@ -31,9 +30,6 @@ void InitializeInputMethod() {
chromeos::IMEBridge::Initialize();
#elif defined(USE_AURA) && defined(OS_LINUX) && !defined(USE_OZONE)
InputMethodAuraLinux::Initialize();
#elif defined(OS_WIN)
if (base::win::IsTSFAwareRequired())
TSFBridge::Initialize();
#endif
}
......@@ -42,8 +38,6 @@ void ShutdownInputMethod() {
chromeos::IMEBridge::Shutdown();
#elif defined(OS_WIN)
internal::DestroySharedInputMethod();
if (base::win::IsTSFAwareRequired())
TSFBridge::Shutdown();
#endif
}
......@@ -60,12 +54,6 @@ void InitializeInputMethodForTesting() {
<< "else.";
LinuxInputMethodContextFactory::SetInstance(
g_linux_input_method_context_factory);
#elif defined(OS_WIN)
if (base::win::IsTSFAwareRequired()) {
// Make sure COM is initialized because TSF depends on COM.
CoInitialize(NULL);
TSFBridge::Initialize();
}
#endif
}
......@@ -82,10 +70,6 @@ void ShutdownInputMethodForTesting() {
g_linux_input_method_context_factory = NULL;
#elif defined(OS_WIN)
internal::DestroySharedInputMethod();
if (base::win::IsTSFAwareRequired()) {
TSFBridge::Shutdown();
CoUninitialize();
}
#endif
}
......
// Copyright (c) 2013 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.
#include "ui/base/ime/input_method_tsf.h"
#include "ui/base/ime/text_input_client.h"
#include "ui/base/ime/win/tsf_bridge.h"
#include "ui/base/ime/win/tsf_event_router.h"
namespace ui {
class InputMethodTSF::TSFEventObserver : public TSFEventRouterObserver {
public:
TSFEventObserver() : is_candidate_popup_open_(false) {}
// Returns true if we know for sure that a candidate window (or IME suggest,
// etc.) is open.
bool IsCandidatePopupOpen() const { return is_candidate_popup_open_; }
// Overridden from TSFEventRouterObserver:
virtual void OnCandidateWindowCountChanged(size_t window_count) OVERRIDE {
is_candidate_popup_open_ = (window_count != 0);
}
private:
// True if we know for sure that a candidate window is open.
bool is_candidate_popup_open_;
DISALLOW_COPY_AND_ASSIGN(TSFEventObserver);
};
InputMethodTSF::InputMethodTSF(internal::InputMethodDelegate* delegate,
HWND toplevel_window_handle)
: InputMethodWin(delegate, toplevel_window_handle),
tsf_event_observer_(new TSFEventObserver()),
tsf_event_router_(new TSFEventRouter(tsf_event_observer_.get())) {
// In non-Aura environment, appropriate callbacks to OnFocus() and OnBlur()
// are not implemented yet. To work around this limitation, here we use
// "always focused" model.
// TODO(ime): Fix the caller of OnFocus() and OnBlur() so that appropriate
// focus event will be passed.
InputMethodWin::OnFocus();
}
InputMethodTSF::~InputMethodTSF() {}
void InputMethodTSF::OnFocus() {
// Do not call baseclass' OnFocus() and discard the event being in
// "always focused" model. See the comment in the constructor.
// TODO(ime): Implement OnFocus once the callers are fixed.
tsf_event_router_->SetManager(
ui::TSFBridge::GetInstance()->GetThreadManager());
}
void InputMethodTSF::OnBlur() {
// Do not call baseclass' OnBlur() and discard the event being in
// "always focused" model. See the comment in the constructor.
// TODO(ime): Implement OnFocus once the callers are fixed.
tsf_event_router_->SetManager(NULL);
}
bool InputMethodTSF::OnUntranslatedIMEMessage(
const base::NativeEvent& event, InputMethod::NativeEventResult* result) {
LRESULT original_result = 0;
BOOL handled = FALSE;
// Even when TSF is enabled, following IMM32/Win32 messages must be handled.
switch (event.message) {
case WM_IME_REQUEST:
// Some TSF-native TIPs (Text Input Processors) such as ATOK and Mozc
// still rely on WM_IME_REQUEST message to implement reverse conversion.
original_result = OnImeRequest(
event.message, event.wParam, event.lParam, &handled);
break;
case WM_CHAR:
case WM_SYSCHAR:
// ui::InputMethod interface is responsible for handling Win32 character
// messages. For instance, we will be here in the following cases.
// - TIP is not activated. (e.g, the current language profile is English)
// - TIP does not handle and WM_KEYDOWN and WM_KEYDOWN is translated into
// WM_CHAR by TranslateMessage API. (e.g, TIP is turned off)
// - Another application sends WM_CHAR through SendMessage API.
original_result = OnChar(
event.hwnd, event.message, event.wParam, event.lParam, &handled);
break;
case WM_DEADCHAR:
case WM_SYSDEADCHAR:
// See the comment in WM_CHAR/WM_SYSCHAR.
original_result = OnDeadChar(
event.message, event.wParam, event.lParam, &handled);
break;
}
if (result)
*result = original_result;
return !!handled;
}
void InputMethodTSF::OnTextInputTypeChanged(const TextInputClient* client) {
if (!IsTextInputClientFocused(client) || !IsWindowFocused(client))
return;
ui::TSFBridge::GetInstance()->CancelComposition();
ui::TSFBridge::GetInstance()->OnTextInputTypeChanged(client);
}
void InputMethodTSF::OnCaretBoundsChanged(const TextInputClient* client) {
if (!IsTextInputClientFocused(client) || !IsWindowFocused(client))
return;
ui::TSFBridge::GetInstance()->OnTextLayoutChanged();
}
void InputMethodTSF::CancelComposition(const TextInputClient* client) {
if (IsTextInputClientFocused(client) && IsWindowFocused(client))
ui::TSFBridge::GetInstance()->CancelComposition();
}
void InputMethodTSF::DetachTextInputClient(TextInputClient* client) {
InputMethodWin::DetachTextInputClient(client);
ui::TSFBridge::GetInstance()->RemoveFocusedClient(client);
}
bool InputMethodTSF::IsCandidatePopupOpen() const {
return tsf_event_observer_->IsCandidatePopupOpen();
}
void InputMethodTSF::OnWillChangeFocusedClient(TextInputClient* focused_before,
TextInputClient* focused) {
if (IsWindowFocused(focused_before)) {
ConfirmCompositionText();
ui::TSFBridge::GetInstance()->RemoveFocusedClient(focused_before);
}
}
void InputMethodTSF::OnDidChangeFocusedClient(TextInputClient* focused_before,
TextInputClient* focused) {
if (IsWindowFocused(focused) && IsTextInputClientFocused(focused)) {
ui::TSFBridge::GetInstance()->SetFocusedClient(
GetAttachedWindowHandle(focused), focused);
// Force to update the input type since client's TextInputStateChanged()
// function might not be called if text input types before the client loses
// focus and after it acquires focus again are the same.
OnTextInputTypeChanged(focused);
// Force to update caret bounds, in case the client thinks that the caret
// bounds has not changed.
OnCaretBoundsChanged(focused);
}
InputMethodWin::OnDidChangeFocusedClient(focused_before, focused);
}
void InputMethodTSF::ConfirmCompositionText() {
if (!IsTextInputTypeNone())
ui::TSFBridge::GetInstance()->ConfirmComposition();
}
} // namespace ui
// Copyright (c) 2013 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 UI_BASE_IME_INPUT_METHOD_TSF_H_
#define UI_BASE_IME_INPUT_METHOD_TSF_H_
#include <windows.h>
#include <string>
#include "base/memory/scoped_ptr.h"
#include "ui/base/ime/input_method_win.h"
namespace ui {
class TSFEventRouter;
// An InputMethod implementation based on Windows TSF API.
class UI_BASE_EXPORT InputMethodTSF : public InputMethodWin {
public:
InputMethodTSF(internal::InputMethodDelegate* delegate,
HWND toplevel_window_handle);
virtual ~InputMethodTSF();
// Overridden from InputMethod:
virtual void OnFocus() OVERRIDE;
virtual void OnBlur() OVERRIDE;
virtual bool OnUntranslatedIMEMessage(const base::NativeEvent& event,
NativeEventResult* result) OVERRIDE;
virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE;
virtual void OnCaretBoundsChanged(const TextInputClient* client) OVERRIDE;
virtual void CancelComposition(const TextInputClient* client) OVERRIDE;
virtual void DetachTextInputClient(TextInputClient* client) OVERRIDE;
virtual bool IsCandidatePopupOpen() const OVERRIDE;
// Overridden from InputMethodBase:
virtual void OnWillChangeFocusedClient(TextInputClient* focused_before,
TextInputClient* focused) OVERRIDE;
virtual void OnDidChangeFocusedClient(TextInputClient* focused_before,
TextInputClient* focused) OVERRIDE;
private:
class TSFEventObserver;
// Asks the client to confirm current composition text.
void ConfirmCompositionText();
// TSF event router and observer.
scoped_ptr<TSFEventObserver> tsf_event_observer_;
scoped_ptr<TSFEventRouter> tsf_event_router_;
DISALLOW_COPY_AND_ASSIGN(InputMethodTSF);
};
} // namespace ui
#endif // UI_BASE_IME_INPUT_METHOD_TSF_H_
// 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.
#include "ui/base/ime/win/mock_tsf_bridge.h"
#include "ui/base/ime/text_input_client.h"
#include "base/logging.h"
namespace ui {
MockTSFBridge::MockTSFBridge()
: enable_ime_call_count_(0),
disalbe_ime_call_count_(0),
cancel_composition_call_count_(0),
confirm_composition_call_count_(0),
on_text_layout_changed_(0),
associate_focus_call_count_(0),
set_focused_client_call_count_(0),
remove_focused_client_call_count_(0),
text_input_client_(NULL),
focused_window_(NULL),
latest_text_input_type_(TEXT_INPUT_TYPE_NONE) {
}
MockTSFBridge::~MockTSFBridge() {
}
bool MockTSFBridge::CancelComposition() {
++cancel_composition_call_count_;
return true;
}
bool MockTSFBridge::ConfirmComposition() {
++confirm_composition_call_count_;
return true;
}
void MockTSFBridge::OnTextInputTypeChanged(const TextInputClient* client) {
latest_text_input_type_ = client->GetTextInputType();
}
void MockTSFBridge::OnTextLayoutChanged() {
++on_text_layout_changed_;
}
void MockTSFBridge::SetFocusedClient(HWND focused_window,
TextInputClient* client) {
++set_focused_client_call_count_;
focused_window_ = focused_window;
text_input_client_ = client;
}
void MockTSFBridge::RemoveFocusedClient(TextInputClient* client) {
++remove_focused_client_call_count_;
DCHECK_EQ(client, text_input_client_);
text_input_client_ = NULL;
focused_window_ = NULL;
}
base::win::ScopedComPtr<ITfThreadMgr> MockTSFBridge::GetThreadManager() {
return thread_manager_;
}
TextInputClient* MockTSFBridge::GetFocusedTextInputClient() const {
return text_input_client_;
}
void MockTSFBridge::Reset() {
enable_ime_call_count_ = 0;
disalbe_ime_call_count_ = 0;
cancel_composition_call_count_ = 0;
confirm_composition_call_count_ = 0;
on_text_layout_changed_ = 0;
associate_focus_call_count_ = 0;
set_focused_client_call_count_ = 0;
remove_focused_client_call_count_ = 0;
text_input_client_ = NULL;
focused_window_ = NULL;
latest_text_input_type_ = TEXT_INPUT_TYPE_NONE;
}
} // namespace ui
// 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 UI_BASE_IME_WIN_MOCK_TSF_BRIDGE_H_
#define UI_BASE_IME_WIN_MOCK_TSF_BRIDGE_H_
#include <msctf.h>
#include "base/compiler_specific.h"
#include "base/win/scoped_comptr.h"
#include "ui/base/ime/text_input_type.h"
#include "ui/base/ime/win/tsf_bridge.h"
namespace ui {
class MockTSFBridge : public TSFBridge {
public:
MockTSFBridge();
virtual ~MockTSFBridge();
// TSFBridge:
virtual bool CancelComposition() OVERRIDE;
virtual bool ConfirmComposition() OVERRIDE;
virtual void OnTextInputTypeChanged(const TextInputClient* client) OVERRIDE;
virtual void OnTextLayoutChanged() OVERRIDE;
virtual void SetFocusedClient(HWND focused_window,
TextInputClient* client) OVERRIDE;
virtual void RemoveFocusedClient(TextInputClient* client) OVERRIDE;
virtual base::win::ScopedComPtr<ITfThreadMgr> GetThreadManager() OVERRIDE;
virtual TextInputClient* GetFocusedTextInputClient() const OVERRIDE;
// Resets MockTSFBridge state including function call counter.
void Reset();
// Call count of EnableIME().
int enable_ime_call_count() const { return enable_ime_call_count_; }
// Call count of DisableIME().
int disalbe_ime_call_count() const { return disalbe_ime_call_count_; }
// Call count of CancelComposition().
int cancel_composition_call_count() const {
return cancel_composition_call_count_;
}
// Call count of ConfirmComposition().
int confirm_composition_call_count() const {
return confirm_composition_call_count_;
}
// Call count of OnTextLayoutChanged().
int on_text_layout_changed() const {
return on_text_layout_changed_;
}
// Call count of AssociateFocus().
int associate_focus_call_count() const { return associate_focus_call_count_; }
// Call count of SetFocusClient().
int set_focused_client_call_count() const {
return set_focused_client_call_count_;
}
// Call count of RemoveFocusedClient().
int remove_focused_client_call_count() const {
return remove_focused_client_call_count_;
}
// Returns current TextInputClient.
TextInputClient* text_input_clinet() const { return text_input_client_; }
// Returns currently focused window handle.
HWND focused_window() const { return focused_window_; }
// Returns latest text input type.
TextInputType latest_text_iput_type() const {
return latest_text_input_type_;
}
private:
int enable_ime_call_count_;
int disalbe_ime_call_count_;
int cancel_composition_call_count_;
int confirm_composition_call_count_;
int on_text_layout_changed_;
int associate_focus_call_count_;
int set_focused_client_call_count_;
int remove_focused_client_call_count_;
TextInputClient* text_input_client_;
HWND focused_window_;
TextInputType latest_text_input_type_;
base::win::ScopedComPtr<ITfThreadMgr> thread_manager_;
DISALLOW_COPY_AND_ASSIGN(MockTSFBridge);
};
} // namespace ui
#endif // UI_BASE_IME_WIN_MOCK_TSF_BRIDGE_H_
This diff is collapsed.
// 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 UI_BASE_IME_WIN_TSF_BRIDGE_H_
#define UI_BASE_IME_WIN_TSF_BRIDGE_H_
#include <msctf.h>
#include <windows.h>
#include "base/basictypes.h"
#include "base/win/scoped_comptr.h"
#include "ui/base/ui_base_export.h"
namespace ui {
class TextInputClient;
// TSFBridge provides high level IME related operations on top of Text Services
// Framework (TSF). TSFBridge is managed by TLS because TSF related stuff is
// associated with each thread and not allowed to access across thread boundary.
// To be consistent with IMM32 behavior, TSFBridge is shared in the same thread.
// TSFBridge is used by the web content text inputting field, for example
// DisableIME() should be called if a password field is focused.
//
// TSFBridge also manages connectivity between TSFTextStore which is the backend
// of text inputting and current focused TextInputClient.
//
// All methods in this class must be used in UI thread.
class UI_BASE_EXPORT TSFBridge {
public:
virtual ~TSFBridge();
// Returns the thread local TSFBridge instance. Initialize() must be called
// first. Do not cache this pointer and use it after TSFBridge Shutdown().
static TSFBridge* GetInstance();
// Sets the thread local instance. Must be called before any calls to
// GetInstance().
static bool Initialize();
// Injects an alternative TSFBridge such as MockTSFBridge for testing. The
// injected object should be released by the caller. This function returns
// previous TSFBridge pointer with ownership.
static TSFBridge* ReplaceForTesting(TSFBridge* bridge);
// Destroys the thread local instance.
static void Shutdown();
// Handles TextInputTypeChanged event. RWHVW is responsible for calling this
// handler whenever renderer's input text type is changed. Does nothing
// unless |client| is focused.
virtual void OnTextInputTypeChanged(const TextInputClient* client) = 0;
// Sends an event to TSF manager that the text layout should be updated.
virtual void OnTextLayoutChanged() = 0;
// Cancels the ongoing composition if exists.
// Returns true if there is no composition.
// Returns false if an edit session is on-going.
// Returns false if an error occures.
virtual bool CancelComposition() = 0;
// Confirms the ongoing composition if exists.
// Returns true if there is no composition.
// Returns false if an edit session is on-going.
// Returns false if an error occures.
virtual bool ConfirmComposition() = 0;
// Sets currently focused TextInputClient.
// Caller must free |client|.
virtual void SetFocusedClient(HWND focused_window,
TextInputClient* client) = 0;
// Removes currently focused TextInputClient.
// Caller must free |client|.
virtual void RemoveFocusedClient(TextInputClient* client) = 0;
// Obtains current thread manager.
virtual base::win::ScopedComPtr<ITfThreadMgr> GetThreadManager() = 0;
// Returns the focused text input client.
virtual TextInputClient* GetFocusedTextInputClient() const = 0;
protected:
// Uses GetInstance() instead.
TSFBridge();
private:
// Releases TLS instance.
static void Finalize(void* data);
DISALLOW_COPY_AND_ASSIGN(TSFBridge);
};
} // namespace ui
#endif // UI_BASE_IME_WIN_TSF_BRIDGE_H_
This diff is collapsed.
// 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 UI_BASE_IME_WIN_TSF_EVENT_ROUTER_H_
#define UI_BASE_IME_WIN_TSF_EVENT_ROUTER_H_
#include <atlbase.h>
#include <atlcom.h>
#include <msctf.h>
#include <set>
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "ui/base/ime/text_input_type.h"
#include "ui/base/ui_base_export.h"
#include "ui/gfx/range/range.h"
struct ITfDocumentMgr;
namespace ui {
class TSFEventRouterObserver {
public:
TSFEventRouterObserver() {}
// Called when the number of currently opened candidate windows changes.
virtual void OnCandidateWindowCountChanged(size_t window_count) {}
// Called when a composition is started.
virtual void OnTSFStartComposition() {}
// Called when the text contents are updated. If there is no composition,
// gfx::Range::InvalidRange is passed to |composition_range|.
virtual void OnTextUpdated(const gfx::Range& composition_range) {}
// Called when a composition is terminated.
virtual void OnTSFEndComposition() {}
protected:
virtual ~TSFEventRouterObserver() {}
private:
DISALLOW_COPY_AND_ASSIGN(TSFEventRouterObserver);
};
// This class monitores TSF related events and forwards them to given
// |observer|.
class UI_BASE_EXPORT TSFEventRouter {
public:
// Do not pass NULL to |observer|.
explicit TSFEventRouter(TSFEventRouterObserver* observer);
virtual ~TSFEventRouter();
// Returns true if the IME is composing text.
bool IsImeComposing();
// Callbacks from the TSFEventRouterDelegate:
void OnCandidateWindowCountChanged(size_t window_count);
void OnTSFStartComposition();
void OnTextUpdated(const gfx::Range& composition_range);
void OnTSFEndComposition();
// Sets |thread_manager| to be monitored. |thread_manager| can be NULL.
void SetManager(ITfThreadMgr* thread_manager);
private:
class Delegate;
CComPtr<Delegate> delegate_;
TSFEventRouterObserver* observer_;
DISALLOW_COPY_AND_ASSIGN(TSFEventRouter);
};
} // namespace ui
#endif // UI_BASE_IME_WIN_TSF_EVENT_ROUTER_H_
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -15,7 +15,6 @@
#include "ui/aura/window_property.h"
#include "ui/base/cursor/cursor_loader_win.h"
#include "ui/base/ime/input_method.h"
#include "ui/base/ime/win/tsf_bridge.h"
#include "ui/base/win/shell.h"
#include "ui/compositor/compositor_constants.h"
#include "ui/gfx/insets.h"
......@@ -847,8 +846,6 @@ void DesktopWindowTreeHostWin::HandleNativeBlur(HWND focused_window) {
}
bool DesktopWindowTreeHostWin::HandleMouseEvent(const ui::MouseEvent& event) {
if (base::win::IsTSFAwareRequired() && event.IsAnyButton())
ui::TSFBridge::GetInstance()->CancelComposition();
return delegate_->OnHostMouseEvent(const_cast<ui::MouseEvent*>(&event));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment