summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryoichio@chromium.org <yoichio@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-22 07:41:17 +0000
committeryoichio@chromium.org <yoichio@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-22 07:41:17 +0000
commit3c467a1535ea095e7fc63a8cb9eabff99c8e7041 (patch)
tree267c921b6b8d88b2e97fa40c929610b682a75ebb
parent9690b9973408b5f84206a9688f84dedc27747f6e (diff)
downloadchromium_src-3c467a1535ea095e7fc63a8cb9eabff99c8e7041.zip
chromium_src-3c467a1535ea095e7fc63a8cb9eabff99c8e7041.tar.gz
chromium_src-3c467a1535ea095e7fc63a8cb9eabff99c8e7041.tar.bz2
move chromeos/ime/ibus_bridge.* and its mocks to ui/base/ime/chromeos
BUG=312218 Review URL: https://codereview.chromium.org/77953002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236714 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/input_method/candidate_window_controller_impl.h2
-rw-r--r--chrome/browser/chromeos/input_method/input_method_configuration.cc2
-rw-r--r--chrome/browser/chromeos/input_method/input_method_engine_ibus.h2
-rw-r--r--chrome/browser/chromeos/input_method/input_method_engine_ibus_browserttests.cc6
-rw-r--r--chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc2
-rw-r--r--chromeos/chromeos.gyp8
-rw-r--r--ui/base/ime/chromeos/ibus_bridge.cc (renamed from chromeos/ime/ibus_bridge.cc)4
-rw-r--r--ui/base/ime/chromeos/ibus_bridge.h (renamed from chromeos/ime/ibus_bridge.h)24
-rw-r--r--ui/base/ime/chromeos/mock_ime_candidate_window_handler.cc (renamed from chromeos/ime/mock_ime_candidate_window_handler.cc)2
-rw-r--r--ui/base/ime/chromeos/mock_ime_candidate_window_handler.h (renamed from chromeos/ime/mock_ime_candidate_window_handler.h)11
-rw-r--r--ui/base/ime/chromeos/mock_ime_engine_handler.cc (renamed from chromeos/ime/mock_ime_engine_handler.cc)2
-rw-r--r--ui/base/ime/chromeos/mock_ime_engine_handler.h (renamed from chromeos/ime/mock_ime_engine_handler.h)11
-rw-r--r--ui/base/ime/chromeos/mock_ime_input_context_handler.cc (renamed from chromeos/ime/mock_ime_input_context_handler.cc)2
-rw-r--r--ui/base/ime/chromeos/mock_ime_input_context_handler.h (renamed from chromeos/ime/mock_ime_input_context_handler.h)11
-rw-r--r--ui/base/ime/ime.gypi16
-rw-r--r--ui/base/ime/input_method_ibus.h2
-rw-r--r--ui/base/ime/input_method_ibus_unittest.cc6
-rw-r--r--ui/base/ime/input_method_initializer.cc2
18 files changed, 63 insertions, 52 deletions
diff --git a/chrome/browser/chromeos/input_method/candidate_window_controller_impl.h b/chrome/browser/chromeos/input_method/candidate_window_controller_impl.h
index b918ce2..54f50ca 100644
--- a/chrome/browser/chromeos/input_method/candidate_window_controller_impl.h
+++ b/chrome/browser/chromeos/input_method/candidate_window_controller_impl.h
@@ -11,7 +11,7 @@
#include "base/observer_list.h"
#include "chrome/browser/chromeos/input_method/candidate_window_view.h"
#include "chrome/browser/chromeos/input_method/infolist_window_view.h"
-#include "chromeos/ime/ibus_bridge.h"
+#include "ui/base/ime/chromeos/ibus_bridge.h"
namespace views {
class Widget;
diff --git a/chrome/browser/chromeos/input_method/input_method_configuration.cc b/chrome/browser/chromeos/input_method/input_method_configuration.cc
index 7ed92d1..dc20c41 100644
--- a/chrome/browser/chromeos/input_method/input_method_configuration.cc
+++ b/chrome/browser/chromeos/input_method/input_method_configuration.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/chromeos/input_method/input_method_delegate_impl.h"
#include "chrome/browser/chromeos/input_method/input_method_manager_impl.h"
#include "chrome/browser/chromeos/input_method/input_method_persistence.h"
-#include "chromeos/ime/ibus_bridge.h"
+#include "ui/base/ime/chromeos/ibus_bridge.h"
namespace chromeos {
namespace input_method {
diff --git a/chrome/browser/chromeos/input_method/input_method_engine_ibus.h b/chrome/browser/chromeos/input_method/input_method_engine_ibus.h
index 4fdbcb2..24ba6e6 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine_ibus.h
+++ b/chrome/browser/chromeos/input_method/input_method_engine_ibus.h
@@ -10,7 +10,7 @@
#include <vector>
#include "base/memory/weak_ptr.h"
#include "chrome/browser/chromeos/input_method/input_method_engine.h"
-#include "chromeos/ime/ibus_bridge.h"
+#include "ui/base/ime/chromeos/ibus_bridge.h"
namespace chromeos {
diff --git a/chrome/browser/chromeos/input_method/input_method_engine_ibus_browserttests.cc b/chrome/browser/chromeos/input_method/input_method_engine_ibus_browserttests.cc
index 2ccd48b..ffa6606 100644
--- a/chrome/browser/chromeos/input_method/input_method_engine_ibus_browserttests.cc
+++ b/chrome/browser/chromeos/input_method/input_method_engine_ibus_browserttests.cc
@@ -6,15 +6,15 @@
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/extensions/extension_test_message_listener.h"
#include "chromeos/ime/component_extension_ime_manager.h"
-#include "chromeos/ime/ibus_bridge.h"
#include "chromeos/ime/ibus_text.h"
#include "chromeos/ime/input_method_descriptor.h"
#include "chromeos/ime/input_method_manager.h"
-#include "chromeos/ime/mock_ime_candidate_window_handler.h"
-#include "chromeos/ime/mock_ime_input_context_handler.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
#include "extensions/common/manifest_handlers/background_info.h"
+#include "ui/base/ime/chromeos/ibus_bridge.h"
+#include "ui/base/ime/chromeos/mock_ime_candidate_window_handler.h"
+#include "ui/base/ime/chromeos/mock_ime_input_context_handler.h"
namespace chromeos {
namespace input_method {
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
index c4d9585..f6aca5a 100644
--- a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
+++ b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
@@ -17,10 +17,10 @@
#include "chromeos/ime/extension_ime_util.h"
#include "chromeos/ime/fake_input_method_delegate.h"
#include "chromeos/ime/mock_component_extension_ime_manager_delegate.h"
-#include "chromeos/ime/mock_ime_engine_handler.h"
#include "chromeos/ime/mock_xkeyboard.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/accelerators/accelerator.h"
+#include "ui/base/ime/chromeos/mock_ime_engine_handler.h"
#include "ui/events/keycodes/keyboard_codes.h"
namespace chromeos {
diff --git a/chromeos/chromeos.gyp b/chromeos/chromeos.gyp
index abf1a03..c909079 100644
--- a/chromeos/chromeos.gyp
+++ b/chromeos/chromeos.gyp
@@ -205,8 +205,6 @@
'ime/component_extension_ime_manager.h',
'ime/extension_ime_util.cc',
'ime/extension_ime_util.h',
- 'ime/ibus_bridge.cc',
- 'ime/ibus_bridge.h',
'ime/ibus_keymap.cc',
'ime/ibus_keymap.h',
'ime/ibus_text.cc',
@@ -428,12 +426,6 @@
'dbus/fake_update_engine_client.h',
'ime/fake_input_method_delegate.cc',
'ime/fake_input_method_delegate.h',
- 'ime/mock_ime_candidate_window_handler.cc',
- 'ime/mock_ime_candidate_window_handler.h',
- 'ime/mock_ime_engine_handler.cc',
- 'ime/mock_ime_engine_handler.h',
- 'ime/mock_ime_input_context_handler.cc',
- 'ime/mock_ime_input_context_handler.h',
'ime/mock_xkeyboard.cc',
'ime/mock_xkeyboard.h',
],
diff --git a/chromeos/ime/ibus_bridge.cc b/ui/base/ime/chromeos/ibus_bridge.cc
index e736e54..f4ed90f 100644
--- a/chromeos/ime/ibus_bridge.cc
+++ b/ui/base/ime/chromeos/ibus_bridge.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2013 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.
-#include "chromeos/ime/ibus_bridge.h"
+#include "ui/base/ime/chromeos/ibus_bridge.h"
#include <map>
#include "base/logging.h"
diff --git a/chromeos/ime/ibus_bridge.h b/ui/base/ime/chromeos/ibus_bridge.h
index e68e2bc..8850edf 100644
--- a/chromeos/ime/ibus_bridge.h
+++ b/ui/base/ime/chromeos/ibus_bridge.h
@@ -1,16 +1,16 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2013 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(nona): Rename this file to ime_bridge.h
-#ifndef CHROMEOS_IME_IBUS_BRIDGE_H_
-#define CHROMEOS_IME_IBUS_BRIDGE_H_
+#ifndef UI_BASE_IME_CHROMEOS_IBUS_BRIDGE_H_
+#define UI_BASE_IME_CHROMEOS_IBUS_BRIDGE_H_
#include <string>
#include "base/basictypes.h"
#include "base/callback.h"
-#include "chromeos/chromeos_export.h"
#include "chromeos/ime/ime_constants.h"
+#include "ui/base/ui_export.h"
namespace chromeos {
namespace input_method {
@@ -19,7 +19,7 @@ class CandidateWindow;
class IBusText;
-class CHROMEOS_EXPORT IBusInputContextHandlerInterface {
+class UI_EXPORT IBusInputContextHandlerInterface {
public:
// Called when the engine commit a text.
virtual void CommitText(const std::string& text) = 0;
@@ -44,7 +44,7 @@ class CHROMEOS_EXPORT IBusInputContextHandlerInterface {
// A interface to handle the engine handler method call.
-class CHROMEOS_EXPORT IBusEngineHandlerInterface {
+class UI_EXPORT IBusEngineHandlerInterface {
public:
typedef base::Callback<void (bool consumed)> KeyEventDoneCallback;
@@ -115,7 +115,7 @@ class CHROMEOS_EXPORT IBusEngineHandlerInterface {
};
// A interface to handle the candidate window related method call.
-class CHROMEOS_EXPORT IBusPanelCandidateWindowHandlerInterface {
+class UI_EXPORT IBusPanelCandidateWindowHandlerInterface {
public:
virtual ~IBusPanelCandidateWindowHandlerInterface() {}
@@ -160,20 +160,20 @@ class CHROMEOS_EXPORT IBusPanelCandidateWindowHandlerInterface {
// their engine with dbus protocol, but new implementation doesn't. Instead of
// dbus communcation, new implementation calls target service(e.g. PanelService
// or EngineService) directly by using this class.
-class IBusBridge {
+class UI_EXPORT IBusBridge {
public:
typedef base::Callback<void()> CreateEngineHandler;
virtual ~IBusBridge();
// Allocates the global instance. Must be called before any calls to Get().
- static CHROMEOS_EXPORT void Initialize();
+ static void Initialize();
// Releases the global instance.
- static CHROMEOS_EXPORT void Shutdown();
+ static void Shutdown();
// Returns IBusBridge global instance. Initialize() must be called first.
- static CHROMEOS_EXPORT IBusBridge* Get();
+ static IBusBridge* Get();
// Returns current InputContextHandler. This function returns NULL if input
// context is not ready to use.
@@ -225,4 +225,4 @@ class IBusBridge {
} // namespace chromeos
-#endif // CHROMEOS_IME_IBUS_BRIDGE_H_
+#endif // UI_BASE_IME_CHROMEOS_IBUS_BRIDGE_H_
diff --git a/chromeos/ime/mock_ime_candidate_window_handler.cc b/ui/base/ime/chromeos/mock_ime_candidate_window_handler.cc
index c2476dd..df135d2 100644
--- a/chromeos/ime/mock_ime_candidate_window_handler.cc
+++ b/ui/base/ime/chromeos/mock_ime_candidate_window_handler.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chromeos/ime/mock_ime_candidate_window_handler.h"
+#include "ui/base/ime/chromeos/mock_ime_candidate_window_handler.h"
namespace chromeos {
diff --git a/chromeos/ime/mock_ime_candidate_window_handler.h b/ui/base/ime/chromeos/mock_ime_candidate_window_handler.h
index 9a5ba64..3a8b301 100644
--- a/chromeos/ime/mock_ime_candidate_window_handler.h
+++ b/ui/base/ime/chromeos/mock_ime_candidate_window_handler.h
@@ -2,15 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROMEOS_IME_MOCK_IME_CANDIDATE_WINDOW_HANDLER_H_
-#define CHROMEOS_IME_MOCK_IME_CANDIDATE_WINDOW_HANDLER_H_
+#ifndef UI_BASE_IME_CHROMEOS_MOCK_IME_CANDIDATE_WINDOW_HANDLER_H_
+#define UI_BASE_IME_CHROMEOS_MOCK_IME_CANDIDATE_WINDOW_HANDLER_H_
#include "chromeos/ime/candidate_window.h"
-#include "chromeos/ime/ibus_bridge.h"
+#include "ui/base/ime/chromeos/ibus_bridge.h"
+#include "ui/base/ui_export.h"
namespace chromeos {
-class MockIMECandidateWindowHandler
+class UI_EXPORT MockIMECandidateWindowHandler
: public IBusPanelCandidateWindowHandlerInterface {
public:
struct UpdateLookupTableArg {
@@ -73,4 +74,4 @@ class MockIMECandidateWindowHandler
} // namespace chromeos
-#endif // CHROMEOS_IME_MOCK_IME_CANDIDATE_WINDOW_HANDLER_H_
+#endif // UI_BASE_IME_CHROMEOS_MOCK_IME_CANDIDATE_WINDOW_HANDLER_H_
diff --git a/chromeos/ime/mock_ime_engine_handler.cc b/ui/base/ime/chromeos/mock_ime_engine_handler.cc
index 644f842..60045a8 100644
--- a/chromeos/ime/mock_ime_engine_handler.cc
+++ b/ui/base/ime/chromeos/mock_ime_engine_handler.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chromeos/ime/mock_ime_engine_handler.h"
+#include "ui/base/ime/chromeos/mock_ime_engine_handler.h"
namespace chromeos {
diff --git a/chromeos/ime/mock_ime_engine_handler.h b/ui/base/ime/chromeos/mock_ime_engine_handler.h
index b835e6d..11ebaae 100644
--- a/chromeos/ime/mock_ime_engine_handler.h
+++ b/ui/base/ime/chromeos/mock_ime_engine_handler.h
@@ -2,14 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROMEOS_IME_MOCK_IME_ENGINE_HANDLER_H_
-#define CHROMEOS_IME_MOCK_IME_ENGINE_HANDLER_H_
+#ifndef UI_BASE_IME_CHROMEOS_MOCK_IME_ENGINE_HANDLER_H_
+#define UI_BASE_IME_CHROMEOS_MOCK_IME_ENGINE_HANDLER_H_
-#include "chromeos/ime/ibus_bridge.h"
+#include "ui/base/ime/chromeos/ibus_bridge.h"
+#include "ui/base/ui_export.h"
namespace chromeos {
-class MockIMEEngineHandler : public IBusEngineHandlerInterface {
+class UI_EXPORT MockIMEEngineHandler : public IBusEngineHandlerInterface {
public:
MockIMEEngineHandler();
virtual ~MockIMEEngineHandler();
@@ -95,4 +96,4 @@ class MockIMEEngineHandler : public IBusEngineHandlerInterface {
} // namespace chromeos
-#endif // CHROMEOS_IME_MOCK_IME_ENGINE_HANDLER_H_
+#endif // UI_BASE_IME_CHROMEOS_MOCK_IME_ENGINE_HANDLER_H_
diff --git a/chromeos/ime/mock_ime_input_context_handler.cc b/ui/base/ime/chromeos/mock_ime_input_context_handler.cc
index 43f1c7c..df24785 100644
--- a/chromeos/ime/mock_ime_input_context_handler.cc
+++ b/ui/base/ime/chromeos/mock_ime_input_context_handler.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chromeos/ime/mock_ime_input_context_handler.h"
+#include "ui/base/ime/chromeos/mock_ime_input_context_handler.h"
#include "chromeos/ime/ibus_text.h"
diff --git a/chromeos/ime/mock_ime_input_context_handler.h b/ui/base/ime/chromeos/mock_ime_input_context_handler.h
index bb4a34d..888dc71 100644
--- a/chromeos/ime/mock_ime_input_context_handler.h
+++ b/ui/base/ime/chromeos/mock_ime_input_context_handler.h
@@ -2,15 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROMEOS_IME_MOCK_IME_INPUT_CONTEXT_HANDLER_H_
-#define CHROMEOS_IME_MOCK_IME_INPUT_CONTEXT_HANDLER_H_
+#ifndef UI_BASE_IME_CHROMEOS_MOCK_IME_INPUT_CONTEXT_HANDLER_H_
+#define UI_BASE_IME_CHROMEOS_MOCK_IME_INPUT_CONTEXT_HANDLER_H_
-#include "chromeos/ime/ibus_bridge.h"
#include "chromeos/ime/ibus_text.h"
+#include "ui/base/ime/chromeos/ibus_bridge.h"
+#include "ui/base/ui_export.h"
namespace chromeos {
-class CHROMEOS_EXPORT MockIMEInputContextHandler
+class UI_EXPORT MockIMEInputContextHandler
: public IBusInputContextHandlerInterface {
public:
struct UpdatePreeditTextArg {
@@ -87,4 +88,4 @@ class CHROMEOS_EXPORT MockIMEInputContextHandler
} // namespace chromeos
-#endif // CHROMEOS_IME_MOCK_IME_INPUT_CONTEXT_HANDLER_H_
+#endif // UI_BASE_IME_CHROMEOS_MOCK_IME_INPUT_CONTEXT_HANDLER_H_
diff --git a/ui/base/ime/ime.gypi b/ui/base/ime/ime.gypi
index f58e01c..8d34f2f 100644
--- a/ui/base/ime/ime.gypi
+++ b/ui/base/ime/ime.gypi
@@ -6,6 +6,14 @@
'sources': [
'character_composer.cc',
'character_composer.h',
+ 'chromeos/ibus_bridge.cc',
+ 'chromeos/ibus_bridge.h',
+ 'chromeos/mock_ime_candidate_window_handler.cc',
+ 'chromeos/mock_ime_candidate_window_handler.h',
+ 'chromeos/mock_ime_engine_handler.cc',
+ 'chromeos/mock_ime_engine_handler.h',
+ 'chromeos/mock_ime_input_context_handler.cc',
+ 'chromeos/mock_ime_input_context_handler.h',
'composition_text.cc',
'composition_text.h',
'composition_text_util_pango.cc',
@@ -73,6 +81,14 @@
'sources!': [
'character_composer.cc',
'character_composer.h',
+ 'chromeos/ibus_bridge.cc',
+ 'chromeos/ibus_bridge.h',
+ 'chromeos/mock_ime_candidate_window_handler.cc',
+ 'chromeos/mock_ime_candidate_window_handler.h',
+ 'chromeos/mock_ime_engine_handler.cc',
+ 'chromeos/mock_ime_engine_handler.h',
+ 'chromeos/mock_ime_input_context_handler.cc',
+ 'chromeos/mock_ime_input_context_handler.h',
'input_method_ibus.cc',
'input_method_ibus.h',
],
diff --git a/ui/base/ime/input_method_ibus.h b/ui/base/ime/input_method_ibus.h
index ec838c2..36b9224 100644
--- a/ui/base/ime/input_method_ibus.h
+++ b/ui/base/ime/input_method_ibus.h
@@ -12,8 +12,8 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
-#include "chromeos/ime/ibus_bridge.h"
#include "ui/base/ime/character_composer.h"
+#include "ui/base/ime/chromeos/ibus_bridge.h"
#include "ui/base/ime/composition_text.h"
#include "ui/base/ime/input_method_base.h"
diff --git a/ui/base/ime/input_method_ibus_unittest.cc b/ui/base/ime/input_method_ibus_unittest.cc
index b7c68a7..45a35bb 100644
--- a/ui/base/ime/input_method_ibus_unittest.cc
+++ b/ui/base/ime/input_method_ibus_unittest.cc
@@ -14,12 +14,12 @@
#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/ime/ibus_bridge.h"
#include "chromeos/ime/ibus_keymap.h"
#include "chromeos/ime/ibus_text.h"
-#include "chromeos/ime/mock_ime_candidate_window_handler.h"
-#include "chromeos/ime/mock_ime_engine_handler.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/ime/chromeos/ibus_bridge.h"
+#include "ui/base/ime/chromeos/mock_ime_candidate_window_handler.h"
+#include "ui/base/ime/chromeos/mock_ime_engine_handler.h"
#include "ui/base/ime/input_method_delegate.h"
#include "ui/base/ime/input_method_ibus.h"
#include "ui/base/ime/text_input_client.h"
diff --git a/ui/base/ime/input_method_initializer.cc b/ui/base/ime/input_method_initializer.cc
index 1840e72..fce15a5 100644
--- a/ui/base/ime/input_method_initializer.cc
+++ b/ui/base/ime/input_method_initializer.cc
@@ -9,7 +9,7 @@
#if defined(OS_CHROMEOS)
#include "base/logging.h"
#include "chromeos/dbus/dbus_thread_manager.h"
-#include "chromeos/ime/ibus_bridge.h"
+#include "ui/base/ime/chromeos/ibus_bridge.h"
#elif defined(USE_AURA) && defined(USE_X11)
#include "base/memory/scoped_ptr.h"
#include "ui/base/ime/linux/fake_input_method_context_factory.h"