| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/renderer/ime_event_guard.h" | 5 #include "content/renderer/ime_event_guard.h" |
| 6 | 6 |
| 7 #include "content/renderer/render_widget.h" | 7 #include "content/renderer/render_widget.h" |
| 8 | 8 |
| 9 namespace content { | 9 namespace content { |
| 10 | 10 |
| 11 // When ThreadedInputConnection is used, we want to make sure that FROM_IME | 11 // When ThreadedInputConnection is used, we want to make sure that FROM_IME |
| 12 // is set only for OnRequestTextInputStateUpdate() so that we can distinguish | 12 // is set only for OnRequestTextInputStateUpdate() so that we can distinguish |
| 13 // it from other updates so that we can wait for it safely. So it is false by | 13 // it from other updates so that we can wait for it safely. So it is false by |
| 14 // default. | 14 // default. |
| 15 ImeEventGuard::ImeEventGuard(RenderWidget* widget) | 15 ImeEventGuard::ImeEventGuard(RenderWidget* widget) |
| 16 : widget_(widget), show_ime_(false), from_ime_(false) { | 16 : widget_(widget), show_virtual_keyboard_(false), reply_to_request_(false) { |
| 17 widget_->OnImeEventGuardStart(this); | 17 widget_->OnImeEventGuardStart(this); |
| 18 } | 18 } |
| 19 | 19 |
| 20 ImeEventGuard::~ImeEventGuard() { | 20 ImeEventGuard::~ImeEventGuard() { |
| 21 widget_->OnImeEventGuardFinish(this); | 21 widget_->OnImeEventGuardFinish(this); |
| 22 } | 22 } |
| 23 | 23 |
| 24 } // namespace content | 24 } // namespace content |
| OLD | NEW |