summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/cros/input_method_library.h
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-15 06:45:53 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-15 06:45:53 +0000
commitdc7b094a338c6c521f918f478e993f0f74bbea0d (patch)
tree14b873b4d90182e0a01dec280ae76b0d54e96235 /chrome/browser/chromeos/cros/input_method_library.h
parentc033c4d76336017a17a77ae6100941761ae64693 (diff)
downloadchromium_src-dc7b094a338c6c521f918f478e993f0f74bbea0d.zip
chromium_src-dc7b094a338c6c521f918f478e993f0f74bbea0d.tar.gz
chromium_src-dc7b094a338c6c521f918f478e993f0f74bbea0d.tar.bz2
Remove use of libcros from InputMethodLibrary.
BUG=chromium-os:16238 TEST==confirm that input methods work as before on the netbook. Also confirm that the chrome builds and works on the desktop as before. Review URL: http://codereview.chromium.org/7003086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/cros/input_method_library.h')
-rw-r--r--chrome/browser/chromeos/cros/input_method_library.h34
1 files changed, 20 insertions, 14 deletions
diff --git a/chrome/browser/chromeos/cros/input_method_library.h b/chrome/browser/chromeos/cros/input_method_library.h
index 5bf175a..2123251 100644
--- a/chrome/browser/chromeos/cros/input_method_library.h
+++ b/chrome/browser/chromeos/cros/input_method_library.h
@@ -1,6 +1,9 @@
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+//
+// TODO(satorux): Move this from 'cros' directory to 'input_method'
+// directory.
#ifndef CHROME_BROWSER_CHROMEOS_CROS_INPUT_METHOD_LIBRARY_H_
#define CHROME_BROWSER_CHROMEOS_CROS_INPUT_METHOD_LIBRARY_H_
@@ -12,7 +15,7 @@
#include "base/observer_list.h"
#include "base/time.h"
#include "base/timer.h"
-#include "third_party/cros/chromeos_input_method.h"
+#include "chrome/browser/chromeos/input_method/ibus_controller.h"
namespace chromeos {
@@ -24,29 +27,30 @@ class InputMethodLibrary {
public:
class Observer {
public:
- virtual ~Observer() = 0;
+ virtual ~Observer() {}
+
// Called when the current input method is changed.
virtual void InputMethodChanged(
InputMethodLibrary* obj,
- const InputMethodDescriptor& current_input_method,
+ const input_method::InputMethodDescriptor& current_input_method,
size_t num_active_input_methods) = 0;
// Called when the active input methods are changed.
virtual void ActiveInputMethodsChanged(
InputMethodLibrary* obj,
- const InputMethodDescriptor& current_input_method,
+ const input_method::InputMethodDescriptor& current_input_method,
size_t num_active_input_methods) = 0;
// Called when the preferences have to be updated.
virtual void PreferenceUpdateNeeded(
InputMethodLibrary* obj,
- const InputMethodDescriptor& previous_input_method,
- const InputMethodDescriptor& current_input_method) = 0;
+ const input_method::InputMethodDescriptor& previous_input_method,
+ const input_method::InputMethodDescriptor& current_input_method) = 0;
// Called when the list of properties is changed.
virtual void PropertyListChanged(
InputMethodLibrary* obj,
- const ImePropertyList& current_ime_properties) = 0;
+ const input_method::ImePropertyList& current_ime_properties) = 0;
// Called by AddObserver() when the first observer is added.
virtual void FirstObserverIsAdded(InputMethodLibrary* obj) = 0;
@@ -61,7 +65,7 @@ class InputMethodLibrary {
// Returns the list of input methods we can select (i.e. active). If the cros
// library is not found or IBus/DBus daemon is not alive, this function
// returns a fallback input method list (and never returns NULL).
- virtual InputMethodDescriptors* GetActiveInputMethods() = 0;
+ virtual input_method::InputMethodDescriptors* GetActiveInputMethods() = 0;
// Returns the number of active input methods.
virtual size_t GetNumActiveInputMethods() = 0;
@@ -69,7 +73,7 @@ class InputMethodLibrary {
// Returns the list of input methods we support, including ones not active.
// If the cros library is not found or IBus/DBus daemon is not alive, this
// function returns a fallback input method list (and never returns NULL).
- virtual InputMethodDescriptors* GetSupportedInputMethods() = 0;
+ virtual input_method::InputMethodDescriptors* GetSupportedInputMethods() = 0;
// Changes the current input method to |input_method_id|.
virtual void ChangeInputMethod(const std::string& input_method_id) = 0;
@@ -98,7 +102,7 @@ class InputMethodLibrary {
// function. See also http://crosbug.com/5217.
virtual bool SetImeConfig(const std::string& section,
const std::string& config_name,
- const ImeConfigValue& value) = 0;
+ const input_method::ImeConfigValue& value) = 0;
// Returns the keyboard overlay ID corresponding to |input_method_id|.
// Returns an empty string if there is no corresponding keyboard overlay ID.
@@ -123,16 +127,18 @@ class InputMethodLibrary {
// Sends a handwriting stroke to libcros. See chromeos::SendHandwritingStroke
// for details.
- virtual void SendHandwritingStroke(const HandwritingStroke& stroke) = 0;
+ virtual void SendHandwritingStroke(
+ const input_method::HandwritingStroke& stroke) = 0;
// Clears last N handwriting strokes in libcros. See
// chromeos::CancelHandwriting for details.
virtual void CancelHandwritingStrokes(int stroke_count) = 0;
- virtual InputMethodDescriptor previous_input_method() const = 0;
- virtual InputMethodDescriptor current_input_method() const = 0;
+ virtual input_method::InputMethodDescriptor previous_input_method() const = 0;
+ virtual input_method::InputMethodDescriptor current_input_method() const = 0;
- virtual const ImePropertyList& current_ime_properties() const = 0;
+ virtual const input_method::ImePropertyList& current_ime_properties()
+ const = 0;
// Factory function, creates a new instance and returns ownership.
// For normal usage, access the singleton via CrosLibrary::Get().