- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / browser / chromeos / input_method / input_method_engine.cc
1 // Copyright (c) 2012 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 #include "chrome/browser/chromeos/input_method/input_method_engine.h"
6
7 #include "chrome/browser/chromeos/input_method/input_method_engine_ibus.h"
8
9 namespace chromeos {
10
11 InputMethodEngine::KeyboardEvent::KeyboardEvent()
12     : alt_key(false),
13       ctrl_key(false),
14       shift_key(false) {
15 }
16
17 InputMethodEngine::KeyboardEvent::~KeyboardEvent() {
18 }
19
20 InputMethodEngine::MenuItem::MenuItem() {
21 }
22
23 InputMethodEngine::MenuItem::~MenuItem() {
24 }
25
26 InputMethodEngine::Candidate::Candidate() {
27 }
28
29 InputMethodEngine::Candidate::~Candidate() {
30 }
31
32 namespace {
33 // The default entry number of a page in CandidateWindowProperty.
34 const int kDefaultPageSize = 9;
35 }  // namespace
36
37 // When the default values are changed, please modify
38 // CandidateWindow::CandidateWindowProperty defined in chromeos/ime/ too.
39 InputMethodEngine::CandidateWindowProperty::CandidateWindowProperty()
40     : page_size(kDefaultPageSize),
41       is_cursor_visible(true),
42       is_vertical(false),
43       show_window_at_composition(false) {
44 }
45
46 InputMethodEngine::CandidateWindowProperty::~CandidateWindowProperty() {
47 }
48
49 InputMethodEngine::Observer::~Observer() {
50 }
51
52 InputMethodEngine* InputMethodEngine::CreateEngine(
53     InputMethodEngine::Observer* observer,
54     const char* engine_name,
55     const char* extension_id,
56     const char* engine_id,
57     const char* description,
58     const std::vector<std::string>& languages,
59     const std::vector<std::string>& layouts,
60     const GURL& options_page,
61     std::string* error) {
62
63   InputMethodEngineIBus* engine = new InputMethodEngineIBus();
64   engine->Initialize(observer,
65                      engine_name,
66                      extension_id,
67                      engine_id,
68                      description,
69                      languages,
70                      layouts,
71                      options_page,
72                      error);
73   return engine;
74 }
75
76 }  // namespace chromeos