| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/public/test/text_input_test_utils.h" | 5 #include "content/public/test/text_input_test_utils.h" |
| 6 | 6 |
| 7 #include <unordered_set> | 7 #include <unordered_set> |
| 8 | 8 |
| 9 #include "content/browser/frame_host/render_frame_host_impl.h" | 9 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 10 #include "content/browser/renderer_host/render_widget_host_impl.h" | 10 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 } | 389 } |
| 390 | 390 |
| 391 void TextInputStateSender::SetCanComposeInline(bool can_compose_inline) { | 391 void TextInputStateSender::SetCanComposeInline(bool can_compose_inline) { |
| 392 text_input_state_->can_compose_inline = can_compose_inline; | 392 text_input_state_->can_compose_inline = can_compose_inline; |
| 393 } | 393 } |
| 394 | 394 |
| 395 void TextInputStateSender::SetShowImeIfNeeded(bool show_ime_if_needed) { | 395 void TextInputStateSender::SetShowImeIfNeeded(bool show_ime_if_needed) { |
| 396 text_input_state_->show_ime_if_needed = show_ime_if_needed; | 396 text_input_state_->show_ime_if_needed = show_ime_if_needed; |
| 397 } | 397 } |
| 398 | 398 |
| 399 void TextInputStateSender::SetIsNonImeChange(bool is_non_ime_change) { | |
| 400 text_input_state_->is_non_ime_change = is_non_ime_change; | |
| 401 } | |
| 402 | |
| 403 TestInputMethodObserver::TestInputMethodObserver() {} | 399 TestInputMethodObserver::TestInputMethodObserver() {} |
| 404 | 400 |
| 405 TestInputMethodObserver::~TestInputMethodObserver() {} | 401 TestInputMethodObserver::~TestInputMethodObserver() {} |
| 406 | 402 |
| 407 // static | 403 // static |
| 408 std::unique_ptr<TestInputMethodObserver> TestInputMethodObserver::Create( | 404 std::unique_ptr<TestInputMethodObserver> TestInputMethodObserver::Create( |
| 409 WebContents* web_contents) { | 405 WebContents* web_contents) { |
| 410 std::unique_ptr<TestInputMethodObserver> observer; | 406 std::unique_ptr<TestInputMethodObserver> observer; |
| 411 | 407 |
| 412 #ifdef USE_AURA | 408 #ifdef USE_AURA |
| 413 RenderWidgetHostViewAura* view = static_cast<RenderWidgetHostViewAura*>( | 409 RenderWidgetHostViewAura* view = static_cast<RenderWidgetHostViewAura*>( |
| 414 web_contents->GetRenderWidgetHostView()); | 410 web_contents->GetRenderWidgetHostView()); |
| 415 observer.reset(new InputMethodObserverAura(view->GetInputMethod())); | 411 observer.reset(new InputMethodObserverAura(view->GetInputMethod())); |
| 416 #endif | 412 #endif |
| 417 return observer; | 413 return observer; |
| 418 } | 414 } |
| 419 | 415 |
| 420 } // namespace content | 416 } // namespace content |
| OLD | NEW |