diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-15 01:13:48 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-15 01:13:48 +0000 |
commit | 51af8ea54802137b938fdc59e2be7bee58049b38 (patch) | |
tree | 7a89184a1c1a2a84af1a6d01ca3b7ccbc933a9f3 /ui/base | |
parent | d7cc394e346982f4bd360612f60cabc806b099ae (diff) | |
download | chromium_src-51af8ea54802137b938fdc59e2be7bee58049b38.zip chromium_src-51af8ea54802137b938fdc59e2be7bee58049b38.tar.gz chromium_src-51af8ea54802137b938fdc59e2be7bee58049b38.tar.bz2 |
This restores a hack that was in place in the old NativeTabContentsContainer code that seemed to clear focus during restoration (though the hack was for another purpose, the hack seemed to fix this bug too). I've isolated the hack to the re-activation code.
http://crbug.com/125976
TEST=see bug
Review URL: https://chromiumcodereview.appspot.com/10378043
Review URL: https://chromiumcodereview.appspot.com/10378043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137040 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r-- | ui/base/test/dummy_input_method.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/ui/base/test/dummy_input_method.h b/ui/base/test/dummy_input_method.h new file mode 100644 index 0000000..45da353 --- /dev/null +++ b/ui/base/test/dummy_input_method.h @@ -0,0 +1,56 @@ +// 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_TEST_DUMMY_INPUT_METHOD_H_ +#define UI_BASE_TEST_DUMMY_INPUT_METHOD_H_ + +#include "ui/base/ime/input_method.h" + +namespace ui { +namespace test { + +class DummyInputMethod : public ui::InputMethod { + public: + DummyInputMethod() {} + virtual ~DummyInputMethod() {} + + // ui::InputMethod overrides: + virtual void SetDelegate( + ui::internal::InputMethodDelegate* delegate) OVERRIDE {} + virtual void Init(bool focused) OVERRIDE {} + virtual void OnFocus() OVERRIDE {} + virtual void OnBlur() OVERRIDE {} + virtual void SetFocusedTextInputClient( + ui::TextInputClient* client) OVERRIDE {} + virtual ui::TextInputClient* GetTextInputClient() const OVERRIDE { + return NULL; + } + virtual void DispatchKeyEvent( + const base::NativeEvent& native_key_event) OVERRIDE {} + virtual void OnTextInputTypeChanged( + const ui::TextInputClient* client) OVERRIDE {} + virtual void OnCaretBoundsChanged( + const ui::TextInputClient* client) OVERRIDE {} + virtual void CancelComposition(const ui::TextInputClient* client) OVERRIDE {} + virtual std::string GetInputLocale() OVERRIDE { return ""; } + virtual base::i18n::TextDirection GetInputTextDirection() OVERRIDE { + return base::i18n::UNKNOWN_DIRECTION; + } + virtual bool IsActive() OVERRIDE { return true; } + virtual ui::TextInputType GetTextInputType() const OVERRIDE { + return ui::TEXT_INPUT_TYPE_NONE; + } + virtual bool CanComposeInline() const OVERRIDE { + return true; + } + + private: + DISALLOW_COPY_AND_ASSIGN(DummyInputMethod); +}; + +} // namespace test +} // namespace ui + +#endif // UI_BASE_TEST_DUMMY_INPUT_METHOD_H_ + |