input_method_observer.h revision c2e0dbddbe15c98d52c4786dac06cb8952a8ae6d
1// Copyright (c) 2013 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef UI_BASE_IME_INPUT_METHOD_OBSERVER_H_ 6#define UI_BASE_IME_INPUT_METHOD_OBSERVER_H_ 7 8#include "ui/base/ui_export.h" 9 10namespace ui { 11 12class InputMethod; 13class TextInputClient; 14 15class UI_EXPORT InputMethodObserver { 16 public: 17 virtual ~InputMethodObserver() {} 18 19 // Called when either: 20 // - the TextInputClient is changed (e.g. by a change of focus) 21 // - the TextInputType of the TextInputClient changes 22 virtual void OnTextInputStateChanged(const TextInputClient* client) = 0; 23 24 // Called when the observed InputMethod is being destroyed. 25 virtual void OnInputMethodDestroyed(const InputMethod* input_method) = 0; 26}; 27 28} // namespace ui 29 30#endif // UI_BASE_IME_INPUT_METHOD_OBSERVER_H_ 31