diff options
author | thakis <thakis@chromium.org> | 2014-11-14 16:04:25 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-15 00:04:49 +0000 |
commit | 671db43a735bd2297225b9d74129402e66fdc549 (patch) | |
tree | eeeb2735f56d964bcdd6a6bf8aa206d41a744b6c /ui/keyboard | |
parent | 3ec1799a199d75eda8bfe2040252df4e05e10735 (diff) | |
download | chromium_src-671db43a735bd2297225b9d74129402e66fdc549.zip chromium_src-671db43a735bd2297225b9d74129402e66fdc549.tar.gz chromium_src-671db43a735bd2297225b9d74129402e66fdc549.tar.bz2 |
Revert of Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480 (patchset #3 id:40001 of https://codereview.chromium.org/728553002/)
Reason for revert:
Breaks incremental builds, crbug.com/433524
Original issue's description:
> Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480
>
> TBR=jam@chromium.org
>
> Committed: https://crrev.com/184f354ddeff66784515ddbbee9c46355cadab6a
> Cr-Commit-Position: refs/heads/master@{#304114}
TBR=jam@chromium.org,jamesr@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/728043002
Cr-Commit-Position: refs/heads/master@{#304305}
Diffstat (limited to 'ui/keyboard')
-rw-r--r-- | ui/keyboard/webui/vk_mojo_handler.cc | 11 | ||||
-rw-r--r-- | ui/keyboard/webui/vk_mojo_handler.h | 10 | ||||
-rw-r--r-- | ui/keyboard/webui/vk_webui_controller.cc | 3 |
3 files changed, 13 insertions, 11 deletions
diff --git a/ui/keyboard/webui/vk_mojo_handler.cc b/ui/keyboard/webui/vk_mojo_handler.cc index 5efe763..48e6dcc 100644 --- a/ui/keyboard/webui/vk_mojo_handler.cc +++ b/ui/keyboard/webui/vk_mojo_handler.cc @@ -14,11 +14,8 @@ namespace keyboard { -VKMojoHandler::VKMojoHandler( - mojo::InterfaceRequest<KeyboardUIHandlerMojo> request) - : binding_(this, request.Pass()) { +VKMojoHandler::VKMojoHandler() { GetInputMethod()->AddObserver(this); - OnTextInputStateChanged(GetInputMethod()->GetTextInputClient()); } VKMojoHandler::~VKMojoHandler() { @@ -29,6 +26,10 @@ ui::InputMethod* VKMojoHandler::GetInputMethod() { return KeyboardController::GetInstance()->proxy()->GetInputMethod(); } +void VKMojoHandler::OnConnectionEstablished() { + OnTextInputStateChanged(GetInputMethod()->GetTextInputClient()); +} + void VKMojoHandler::SendKeyEvent(const mojo::String& event_type, int32_t char_value, int32_t key_code, @@ -106,7 +107,7 @@ void VKMojoHandler::OnTextInputStateChanged( type_name = "text"; break; } - binding_.client()->OnTextInputTypeChanged(type_name); + client()->OnTextInputTypeChanged(type_name); } void VKMojoHandler::OnInputMethodDestroyed( diff --git a/ui/keyboard/webui/vk_mojo_handler.h b/ui/keyboard/webui/vk_mojo_handler.h index 8d69d15..5a25abd 100644 --- a/ui/keyboard/webui/vk_mojo_handler.h +++ b/ui/keyboard/webui/vk_mojo_handler.h @@ -6,21 +6,23 @@ #define UI_KEYBOARD_WEBUI_VK_MOJO_HANDLER_H_ #include "base/macros.h" -#include "mojo/public/cpp/bindings/binding.h" #include "ui/base/ime/input_method_observer.h" #include "ui/keyboard/webui/keyboard.mojom.h" namespace keyboard { -class VKMojoHandler : public KeyboardUIHandlerMojo, +class VKMojoHandler : public mojo::InterfaceImpl<KeyboardUIHandlerMojo>, public ui::InputMethodObserver { public: - explicit VKMojoHandler(mojo::InterfaceRequest<KeyboardUIHandlerMojo> request); + VKMojoHandler(); ~VKMojoHandler() override; private: ui::InputMethod* GetInputMethod(); + // mojo::InterfaceImpl<>: + void OnConnectionEstablished() override; + // KeyboardUIHandlerMojo: void SendKeyEvent(const mojo::String& event_type, int32_t char_value, @@ -38,8 +40,6 @@ class VKMojoHandler : public KeyboardUIHandlerMojo, void OnInputMethodDestroyed(const ui::InputMethod* input_method) override; void OnShowImeIfNeeded() override; - mojo::Binding<KeyboardUIHandlerMojo> binding_; - DISALLOW_COPY_AND_ASSIGN(VKMojoHandler); }; diff --git a/ui/keyboard/webui/vk_webui_controller.cc b/ui/keyboard/webui/vk_webui_controller.cc index 5fd04ce..2e0138b 100644 --- a/ui/keyboard/webui/vk_webui_controller.cc +++ b/ui/keyboard/webui/vk_webui_controller.cc @@ -68,7 +68,8 @@ void VKWebUIController::RenderViewCreated(content::RenderViewHost* host) { void VKWebUIController::CreateAndStoreUIHandler( mojo::InterfaceRequest<KeyboardUIHandlerMojo> request) { - ui_handler_ = make_scoped_ptr(new VKMojoHandler(request.Pass())); + ui_handler_ = scoped_ptr<VKMojoHandler>( + mojo::WeakBindToRequest(new VKMojoHandler(), &request)); } //////////////////////////////////////////////////////////////////////////////// |