Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / ui / base / ime / chromeos / mock_ime_candidate_window_handler.h
blob9c53e33e180210a630a748f255c5fb4afa4d563d
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
3 // found in the LICENSE file.
5 #ifndef UI_BASE_IME_CHROMEOS_MOCK_IME_CANDIDATE_WINDOW_HANDLER_H_
6 #define UI_BASE_IME_CHROMEOS_MOCK_IME_CANDIDATE_WINDOW_HANDLER_H_
8 #include "ui/base/ime/candidate_window.h"
9 #include "ui/base/ime/chromeos/ime_bridge.h"
10 #include "ui/base/ime/ui_base_ime_export.h"
12 namespace chromeos {
14 class UI_BASE_IME_EXPORT MockIMECandidateWindowHandler
15 : public IMECandidateWindowHandlerInterface {
16 public:
17 struct UpdateLookupTableArg {
18 ui::CandidateWindow lookup_table;
19 bool is_visible;
22 struct UpdateAuxiliaryTextArg {
23 std::string text;
24 bool is_visible;
27 MockIMECandidateWindowHandler();
28 ~MockIMECandidateWindowHandler() override;
30 // IMECandidateWindowHandlerInterface override.
31 void UpdateLookupTable(const ui::CandidateWindow& candidate_window,
32 bool visible) override;
33 void UpdatePreeditText(const base::string16& text,
34 uint32 cursor_pos,
35 bool visible) override;
36 void SetCursorBounds(const gfx::Rect& cursor_bounds,
37 const gfx::Rect& composition_head) override;
39 int set_cursor_bounds_call_count() const {
40 return set_cursor_bounds_call_count_;
43 int update_lookup_table_call_count() const {
44 return update_lookup_table_call_count_;
47 const UpdateLookupTableArg& last_update_lookup_table_arg() {
48 return last_update_lookup_table_arg_;
50 // Resets all call count.
51 void Reset();
53 private:
54 int set_cursor_bounds_call_count_;
55 int update_lookup_table_call_count_;
56 UpdateLookupTableArg last_update_lookup_table_arg_;
59 } // namespace chromeos
61 #endif // UI_BASE_IME_CHROMEOS_MOCK_IME_CANDIDATE_WINDOW_HANDLER_H_