summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-10 10:54:27 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-10 10:54:27 +0000
commitbb12043816b94918f1fb1b327d175cd9af71180d (patch)
tree8042eaa31593536b7e452ff269912d41318b57cc /ui
parent6a20bb2668174959870ad8917888ff79dbc9b04a (diff)
downloadchromium_src-bb12043816b94918f1fb1b327d175cd9af71180d.zip
chromium_src-bb12043816b94918f1fb1b327d175cd9af71180d.tar.gz
chromium_src-bb12043816b94918f1fb1b327d175cd9af71180d.tar.bz2
Revert 210788 "Supports IsCandidatePopupOpen() on Windows-TSF en..."
Breaks AcceleratorControllerTest.Register on Win8 Aura [1628:40:0710/025633:4304707:FATAL:scoped_comptr.h(151)] Check failed: ptr_ != NULL. Backtrace: base::debug::StackTrace::StackTrace [0x10085221+33] logging::LogMessage::~LogMessage [0x100FF98E+94] base::win::ScopedComPtr<ITfDocumentMgr,&_GUID_aa80e7f4_2021_11d2_93e0_0060b067b86e>::operator-> [0x036BA593+259] ui::TSFEventRouter::Delegate::SetManager [0x036C33E7+311] ui::TSFEventRouter::SetManager [0x036C46E4+36] ui::InputMethodTSF::OnFocus [0x036ADBCD+141] ui::InputMethodBase::Init [0x036A7946+38] ui::InputMethodWin::Init [0x036AEB02+50] views::corewm::InputMethodEventFilter::InputMethodEventFilter [0x03B1C70E+238] > Supports IsCandidatePopupOpen() on Windows-TSF environment. > > BUG=245578 > TEST=Test manually. > > Review URL: https://chromiumcodereview.appspot.com/17573006 TBR=yukishiino@chromium.org Review URL: https://codereview.chromium.org/18539003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210817 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/base/ime/input_method_tsf.cc43
-rw-r--r--ui/base/ime/input_method_tsf.h10
2 files changed, 7 insertions, 46 deletions
diff --git a/ui/base/ime/input_method_tsf.cc b/ui/base/ime/input_method_tsf.cc
index cd94355..c786b48 100644
--- a/ui/base/ime/input_method_tsf.cc
+++ b/ui/base/ime/input_method_tsf.cc
@@ -6,35 +6,12 @@
#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())) {
+ : InputMethodWin(delegate, toplevel_window_handle) {
// 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.
@@ -43,23 +20,16 @@ InputMethodTSF::InputMethodTSF(internal::InputMethodDelegate* delegate,
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.
+ // Ignore OnFocus event for "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.
+ // Ignore OnBlur event for "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(
@@ -129,7 +99,8 @@ void InputMethodTSF::SetFocusedTextInputClient(TextInputClient* client) {
}
bool InputMethodTSF::IsCandidatePopupOpen() const {
- return tsf_event_observer_->IsCandidatePopupOpen();
+ // TODO(yukishiino): Implement this method.
+ return false;
}
void InputMethodTSF::OnWillChangeFocusedClient(TextInputClient* focused_before,
diff --git a/ui/base/ime/input_method_tsf.h b/ui/base/ime/input_method_tsf.h
index 98fa1f7..45c5add 100644
--- a/ui/base/ime/input_method_tsf.h
+++ b/ui/base/ime/input_method_tsf.h
@@ -9,19 +9,15 @@
#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_EXPORT InputMethodTSF : public InputMethodWin {
public:
InputMethodTSF(internal::InputMethodDelegate* delegate,
HWND toplevel_window_handle);
- virtual ~InputMethodTSF();
// Overridden from InputMethod:
virtual void OnFocus() OVERRIDE;
@@ -41,8 +37,6 @@ class UI_EXPORT InputMethodTSF : public InputMethodWin {
TextInputClient* focused) OVERRIDE;
private:
- class TSFEventObserver;
-
// Asks the client to confirm current composition text.
void ConfirmCompositionText();
@@ -50,10 +44,6 @@ class UI_EXPORT InputMethodTSF : public InputMethodWin {
// focus.
bool IsWindowFocused(const TextInputClient* client) const;
- // TSF event router and observer.
- scoped_ptr<TSFEventObserver> tsf_event_observer_;
- scoped_ptr<TSFEventRouter> tsf_event_router_;
-
DISALLOW_COPY_AND_ASSIGN(InputMethodTSF);
};