Commit 423ef49d authored by scottmg@chromium.org's avatar scottmg@chromium.org

Revert 243777 "Moves CandidateWindow model to ui/base/ime."

Most CrOS failing similar to this:

FAILED: c++ -MMD -MF obj/chrome/browser/chromeos/input_method/test_support_common.mock_input_method_engine.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_NSS=1 -DUSE_X11=1 -DOS_CHROMEOS=1 -DUSE_XI2_MT=2 -DFILE_MANAGER_EXTENSION=1 -DIMAGE_LOADER_EXTENSION=1 -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_INPUT_SPEECH -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DUSE_UDEV -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -DENABLE_EGLIMAGE=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_AUTOMATION=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_FULL_PRINTING=1 -DENABLE_PRINTING=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_MANAGED_USERS=1 -DENABLE_MDNS=1 -DGL_GLEXT_PROTOTYPES -DLIBPEERCONNECTION_LIB=1 -DUSE_BRLAPI -DGTEST_HAS_POSIX_RE=0 -DNACL_WINDOWS=0 -DNACL_LINUX=1 -DNACL_OSX=0 -DNACL_TARGET_SUBARCH=64 -DNACL_TARGET_ARCH=x86 -DNACL_BUILD_SUBARCH=64 -DNACL_BUILD_ARCH=x86 -DPROTOBUF_USE_DLLS -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DU_USING_ICU_NAMESPACE=0 -DU_STATIC_IMPLEMENTATION -DCHROME_PNG_WRITE_SUPPORT -DPNG_USER_CONFIG -DSK_ENABLE_INST_COUNT=0 -DSK_SUPPORT_GPU=1 '-DGR_GL_CUSTOM_SETUP_HEADER="GrGLConfig_chrome.h"' -DSK_ENABLE_LEGACY_API_ALIASING=1 -DSK_ATTR_DEPRECATED=SK_NOTHING_ARG1 -DSK_SUPPORT_LEGACY_COLORTYPE=1 -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_SUPPORT_LEGACY_SK64 -DSK_SUPPORT_LEGACY_ONLOCKPIXELS -DSK_USE_POSIX_THREADS -DSK_DEFERRED_CANVAS_USES_FACTORIES=1 -DFEATURE_ENABLE_SSL -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DJSONCPP_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DLINUX -DPOSIX -DCHROMEOS -DUNIT_TEST -DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_FORTIFY_SOURCE=2 -I../.. -I../../skia/config -I../../third_party/khronos -I../../gpu -I../../third_party/WebKit/Source -Igen -Igen/chrome -Igen/protoc_out -I../../third_party/protobuf -I../../third_party/protobuf/src -I../../third_party/WebKit -I../../third_party/icu/source/common -I../../third_party/npapi -I../../third_party/npapi/bindings -I../../v8/include -I../../third_party/libpng -I../../third_party/libwebp -I../../third_party/ots/include -I../../third_party/qcms/src -I../../third_party/iccjpeg -I../../third_party/libjpeg -I../../third_party/skia/src/core -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/pdf -I../../third_party/skia/include/gpu -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../skia/ext -I../../third_party/libjingle/overrides -I../../third_party/libjingle/source -I../../testing/gtest/include -I../../third_party -I../../third_party/webrtc -I../../third_party/jsoncpp/overrides/include -I../../third_party/jsoncpp/source/include -I../../third_party/cacheinvalidation/overrides -I../../third_party/cacheinvalidation/src -I../../testing/gmock/include -I../../third_party/zlib -I../../third_party/leveldatabase/src/include -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase -Igen/policy -I../../net/third_party/nss/ssl -Werror -pthread -fno-exceptions -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/nss -I/usr/include/nspr -O2 -fno-ident -fdata-sections -ffunction-sections -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare  -c ../../chrome/browser/chromeos/input_method/mock_input_method_engine.cc -o obj/chrome/browser/chromeos/input_method/test_support_common.mock_input_method_engine.o
../../chrome/browser/chromeos/input_method/mock_input_method_engine.cc:14:43: fatalerror: chromeos/ime/candidate_window.h: No such file or directory
compilation terminated.
ninja: build stopped: subcommand failed.

> Moves CandidateWindow model to ui/base/ime.
> 
> BUG=325813
> R=komatsu@chromium.org
> TEST=build passes
> 
> Review URL: https://codereview.chromium.org/126363002

TBR=mukai@chromium.org

Review URL: https://codereview.chromium.org/130833002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243784 0039d316-1c4b-4281-b951-d872f2087c98
parent 4600b62e
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "chrome/browser/chromeos/input_method/candidate_window_constants.h" #include "chrome/browser/chromeos/input_method/candidate_window_constants.h"
#include "ui/base/ime/candidate_window.h" #include "chromeos/ime/candidate_window.h"
#include "ui/gfx/color_utils.h" #include "ui/gfx/color_utils.h"
#include "ui/native_theme/native_theme.h" #include "ui/native_theme/native_theme.h"
#include "ui/views/background.h" #include "ui/views/background.h"
...@@ -43,14 +43,14 @@ class VerticalCandidateLabel : public views::Label { ...@@ -43,14 +43,14 @@ class VerticalCandidateLabel : public views::Label {
// Creates the shortcut label, and returns it (never returns NULL). // Creates the shortcut label, and returns it (never returns NULL).
// The label text is not set in this function. // The label text is not set in this function.
views::Label* CreateShortcutLabel( views::Label* CreateShortcutLabel(
ui::CandidateWindow::Orientation orientation, CandidateWindow::Orientation orientation,
const ui::NativeTheme& theme) { const ui::NativeTheme& theme) {
// Create the shortcut label. The label will be owned by // Create the shortcut label. The label will be owned by
// |wrapped_shortcut_label|, hence it's deleted when // |wrapped_shortcut_label|, hence it's deleted when
// |wrapped_shortcut_label| is deleted. // |wrapped_shortcut_label| is deleted.
views::Label* shortcut_label = new views::Label; views::Label* shortcut_label = new views::Label;
if (orientation == ui::CandidateWindow::VERTICAL) { if (orientation == CandidateWindow::VERTICAL) {
shortcut_label->SetFontList( shortcut_label->SetFontList(
shortcut_label->font_list().DeriveFontListWithSizeDeltaAndStyle( shortcut_label->font_list().DeriveFontListWithSizeDeltaAndStyle(
kFontSizeDelta, gfx::Font::BOLD)); kFontSizeDelta, gfx::Font::BOLD));
...@@ -70,14 +70,14 @@ views::Label* CreateShortcutLabel( ...@@ -70,14 +70,14 @@ views::Label* CreateShortcutLabel(
const gfx::Insets kVerticalShortcutLabelInsets(1, 6, 1, 6); const gfx::Insets kVerticalShortcutLabelInsets(1, 6, 1, 6);
const gfx::Insets kHorizontalShortcutLabelInsets(1, 3, 1, 0); const gfx::Insets kHorizontalShortcutLabelInsets(1, 3, 1, 0);
const gfx::Insets insets = const gfx::Insets insets =
(orientation == ui::CandidateWindow::VERTICAL ? (orientation == CandidateWindow::VERTICAL ?
kVerticalShortcutLabelInsets : kVerticalShortcutLabelInsets :
kHorizontalShortcutLabelInsets); kHorizontalShortcutLabelInsets);
shortcut_label->set_border(views::Border::CreateEmptyBorder( shortcut_label->set_border(views::Border::CreateEmptyBorder(
insets.top(), insets.left(), insets.bottom(), insets.right())); insets.top(), insets.left(), insets.bottom(), insets.right()));
// Add decoration based on the orientation. // Add decoration based on the orientation.
if (orientation == ui::CandidateWindow::VERTICAL) { if (orientation == CandidateWindow::VERTICAL) {
// Set the background color. // Set the background color.
SkColor blackish = color_utils::AlphaBlend( SkColor blackish = color_utils::AlphaBlend(
SK_ColorBLACK, SK_ColorBLACK,
...@@ -95,12 +95,12 @@ views::Label* CreateShortcutLabel( ...@@ -95,12 +95,12 @@ views::Label* CreateShortcutLabel(
// Creates the candidate label, and returns it (never returns NULL). // Creates the candidate label, and returns it (never returns NULL).
// The label text is not set in this function. // The label text is not set in this function.
views::Label* CreateCandidateLabel( views::Label* CreateCandidateLabel(
ui::CandidateWindow::Orientation orientation) { CandidateWindow::Orientation orientation) {
views::Label* candidate_label = NULL; views::Label* candidate_label = NULL;
// Create the candidate label. The label will be added to |this| as a // Create the candidate label. The label will be added to |this| as a
// child view, hence it's deleted when |this| is deleted. // child view, hence it's deleted when |this| is deleted.
if (orientation == ui::CandidateWindow::VERTICAL) { if (orientation == CandidateWindow::VERTICAL) {
candidate_label = new VerticalCandidateLabel; candidate_label = new VerticalCandidateLabel;
} else { } else {
candidate_label = new views::Label; candidate_label = new views::Label;
...@@ -117,8 +117,7 @@ views::Label* CreateCandidateLabel( ...@@ -117,8 +117,7 @@ views::Label* CreateCandidateLabel(
// Creates the annotation label, and return it (never returns NULL). // Creates the annotation label, and return it (never returns NULL).
// The label text is not set in this function. // The label text is not set in this function.
views::Label* CreateAnnotationLabel( views::Label* CreateAnnotationLabel(
ui::CandidateWindow::Orientation orientation, CandidateWindow::Orientation orientation, const ui::NativeTheme& theme) {
const ui::NativeTheme& theme) {
// Create the annotation label. // Create the annotation label.
views::Label* annotation_label = new views::Label; views::Label* annotation_label = new views::Label;
...@@ -137,7 +136,7 @@ views::Label* CreateAnnotationLabel( ...@@ -137,7 +136,7 @@ views::Label* CreateAnnotationLabel(
CandidateView::CandidateView( CandidateView::CandidateView(
views::ButtonListener* listener, views::ButtonListener* listener,
ui::CandidateWindow::Orientation orientation) CandidateWindow::Orientation orientation)
: views::CustomButton(listener), : views::CustomButton(listener),
orientation_(orientation), orientation_(orientation),
shortcut_label_(NULL), shortcut_label_(NULL),
...@@ -155,7 +154,7 @@ CandidateView::CandidateView( ...@@ -155,7 +154,7 @@ CandidateView::CandidateView(
AddChildView(candidate_label_); AddChildView(candidate_label_);
AddChildView(annotation_label_); AddChildView(annotation_label_);
if (orientation == ui::CandidateWindow::VERTICAL) { if (orientation == CandidateWindow::VERTICAL) {
infolist_icon_ = new views::View; infolist_icon_ = new views::View;
infolist_icon_->set_background( infolist_icon_->set_background(
views::Background::CreateSolidBackground(theme.GetSystemColor( views::Background::CreateSolidBackground(theme.GetSystemColor(
...@@ -176,9 +175,9 @@ void CandidateView::SetWidths(int shortcut_width, int candidate_width) { ...@@ -176,9 +175,9 @@ void CandidateView::SetWidths(int shortcut_width, int candidate_width) {
candidate_width_ = candidate_width; candidate_width_ = candidate_width;
} }
void CandidateView::SetEntry(const ui::CandidateWindow::Entry& entry) { void CandidateView::SetEntry(const CandidateWindow::Entry& entry) {
std::string label = entry.label; std::string label = entry.label;
if (!label.empty() && orientation_ != ui::CandidateWindow::VERTICAL) if (!label.empty() && orientation_ != CandidateWindow::VERTICAL)
label += '.'; label += '.';
shortcut_label_->SetText(base::UTF8ToUTF16(label)); shortcut_label_->SetText(base::UTF8ToUTF16(label));
candidate_label_->SetText(base::UTF8ToUTF16(entry.value)); candidate_label_->SetText(base::UTF8ToUTF16(entry.value));
...@@ -240,7 +239,7 @@ bool CandidateView::OnMouseDragged(const ui::MouseEvent& event) { ...@@ -240,7 +239,7 @@ bool CandidateView::OnMouseDragged(const ui::MouseEvent& event) {
void CandidateView::Layout() { void CandidateView::Layout() {
const int padding_width = const int padding_width =
orientation_ == ui::CandidateWindow::VERTICAL ? 4 : 6; orientation_ == CandidateWindow::VERTICAL ? 4 : 6;
int x = 0; int x = 0;
shortcut_label_->SetBounds(x, 0, shortcut_width_, height()); shortcut_label_->SetBounds(x, 0, shortcut_width_, height());
if (shortcut_width_ > 0) if (shortcut_width_ > 0)
...@@ -262,7 +261,7 @@ void CandidateView::Layout() { ...@@ -262,7 +261,7 @@ void CandidateView::Layout() {
gfx::Size CandidateView::GetPreferredSize() { gfx::Size CandidateView::GetPreferredSize() {
const int padding_width = const int padding_width =
orientation_ == ui::CandidateWindow::VERTICAL ? 4 : 6; orientation_ == CandidateWindow::VERTICAL ? 4 : 6;
gfx::Size size; gfx::Size size;
if (shortcut_label_->visible()) { if (shortcut_label_->visible()) {
size = shortcut_label_->GetPreferredSize(); size = shortcut_label_->GetPreferredSize();
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_VIEW_H_ #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_VIEW_H_
#include "base/gtest_prod_util.h" #include "base/gtest_prod_util.h"
#include "ui/base/ime/candidate_window.h" #include "chromeos/ime/candidate_window.h"
#include "ui/views/controls/button/custom_button.h" #include "ui/views/controls/button/custom_button.h"
#include "ui/views/controls/label.h" #include "ui/views/controls/label.h"
#include "ui/views/view.h" #include "ui/views/view.h"
...@@ -18,7 +18,7 @@ namespace input_method { ...@@ -18,7 +18,7 @@ namespace input_method {
class CandidateView : public views::CustomButton { class CandidateView : public views::CustomButton {
public: public:
CandidateView(views::ButtonListener* listener, CandidateView(views::ButtonListener* listener,
ui::CandidateWindow::Orientation orientation); CandidateWindow::Orientation orientation);
virtual ~CandidateView() {} virtual ~CandidateView() {}
void GetPreferredWidths(int* shortcut_width, void GetPreferredWidths(int* shortcut_width,
...@@ -27,7 +27,7 @@ class CandidateView : public views::CustomButton { ...@@ -27,7 +27,7 @@ class CandidateView : public views::CustomButton {
void SetWidths(int shortcut_width, void SetWidths(int shortcut_width,
int candidate_width); int candidate_width);
void SetEntry(const ui::CandidateWindow::Entry& entry); void SetEntry(const CandidateWindow::Entry& entry);
// Sets infolist icon. // Sets infolist icon.
void SetInfolistIcon(bool enable); void SetInfolistIcon(bool enable);
...@@ -45,7 +45,7 @@ class CandidateView : public views::CustomButton { ...@@ -45,7 +45,7 @@ class CandidateView : public views::CustomButton {
virtual gfx::Size GetPreferredSize() OVERRIDE; virtual gfx::Size GetPreferredSize() OVERRIDE;
// The orientation of the candidate view. // The orientation of the candidate view.
ui::CandidateWindow::Orientation orientation_; CandidateWindow::Orientation orientation_;
// Views created in the class will be part of tree of |this|, so these // Views created in the class will be part of tree of |this|, so these
// child views will be deleted when |this| is deleted. // child views will be deleted when |this| is deleted.
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "ui/gfx/screen.h" #include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h" #include "ui/views/widget/widget.h"
namespace chromeos { namespace chromeos {
namespace input_method { namespace input_method {
...@@ -100,7 +101,7 @@ void CandidateWindowControllerImpl::FocusStateChanged(bool is_focused) { ...@@ -100,7 +101,7 @@ void CandidateWindowControllerImpl::FocusStateChanged(bool is_focused) {
// static // static
void CandidateWindowControllerImpl::ConvertLookupTableToInfolistEntry( void CandidateWindowControllerImpl::ConvertLookupTableToInfolistEntry(
const ui::CandidateWindow& candidate_window, const CandidateWindow& candidate_window,
std::vector<InfolistEntry>* infolist_entries, std::vector<InfolistEntry>* infolist_entries,
bool* has_highlighted) { bool* has_highlighted) {
DCHECK(infolist_entries); DCHECK(infolist_entries);
...@@ -112,7 +113,7 @@ void CandidateWindowControllerImpl::ConvertLookupTableToInfolistEntry( ...@@ -112,7 +113,7 @@ void CandidateWindowControllerImpl::ConvertLookupTableToInfolistEntry(
candidate_window.cursor_position() % candidate_window.page_size(); candidate_window.cursor_position() % candidate_window.page_size();
for (size_t i = 0; i < candidate_window.candidates().size(); ++i) { for (size_t i = 0; i < candidate_window.candidates().size(); ++i) {
const ui::CandidateWindow::Entry& ibus_entry = const CandidateWindow::Entry& ibus_entry =
candidate_window.candidates()[i]; candidate_window.candidates()[i];
if (ibus_entry.description_title.empty() && if (ibus_entry.description_title.empty() &&
ibus_entry.description_body.empty()) ibus_entry.description_body.empty())
...@@ -128,7 +129,7 @@ void CandidateWindowControllerImpl::ConvertLookupTableToInfolistEntry( ...@@ -128,7 +129,7 @@ void CandidateWindowControllerImpl::ConvertLookupTableToInfolistEntry(
} }
void CandidateWindowControllerImpl::UpdateLookupTable( void CandidateWindowControllerImpl::UpdateLookupTable(
const ui::CandidateWindow& candidate_window, const CandidateWindow& candidate_window,
bool visible) { bool visible) {
// If it's not visible, hide the lookup table and return. // If it's not visible, hide the lookup table and return.
if (!visible) { if (!visible) {
......
...@@ -18,13 +18,10 @@ namespace views { ...@@ -18,13 +18,10 @@ namespace views {
class Widget; class Widget;
} // namespace views } // namespace views
namespace ui {
class CandidateWindow;
} // namespace ui
namespace chromeos { namespace chromeos {
namespace input_method { namespace input_method {
class CandidateWindow;
class DelayableWidget; class DelayableWidget;
class ModeIndicatorController; class ModeIndicatorController;
...@@ -51,7 +48,7 @@ class CandidateWindowControllerImpl ...@@ -51,7 +48,7 @@ class CandidateWindowControllerImpl
// |has_highlighted| to true if infolist_entries contains highlighted entry. // |has_highlighted| to true if infolist_entries contains highlighted entry.
// TODO(mukai): move this method (and tests) to the new InfolistEntry model. // TODO(mukai): move this method (and tests) to the new InfolistEntry model.
static void ConvertLookupTableToInfolistEntry( static void ConvertLookupTableToInfolistEntry(
const ui::CandidateWindow& candidate_window, const CandidateWindow& candidate_window,
std::vector<InfolistEntry>* infolist_entries, std::vector<InfolistEntry>* infolist_entries,
bool* has_highlighted); bool* has_highlighted);
...@@ -65,9 +62,8 @@ class CandidateWindowControllerImpl ...@@ -65,9 +62,8 @@ class CandidateWindowControllerImpl
// IBusPanelCandidateWindowHandlerInterface implementation. // IBusPanelCandidateWindowHandlerInterface implementation.
virtual void SetCursorBounds(const gfx::Rect& cursor_bounds, virtual void SetCursorBounds(const gfx::Rect& cursor_bounds,
const gfx::Rect& composition_head) OVERRIDE; const gfx::Rect& composition_head) OVERRIDE;
virtual void UpdateLookupTable( virtual void UpdateLookupTable(const CandidateWindow& candidate_window,
const ui::CandidateWindow& candidate_window, bool visible) OVERRIDE;
bool visible) OVERRIDE;
virtual void UpdatePreeditText(const std::string& utf8_text, virtual void UpdatePreeditText(const std::string& utf8_text,
unsigned int cursor, bool visible) OVERRIDE; unsigned int cursor, bool visible) OVERRIDE;
virtual void FocusStateChanged(bool is_focused) OVERRIDE; virtual void FocusStateChanged(bool is_focused) OVERRIDE;
......
...@@ -58,10 +58,10 @@ class CandidateWindowControllerImplTest : public testing::Test { ...@@ -58,10 +58,10 @@ class CandidateWindowControllerImplTest : public testing::Test {
TEST_F(CandidateWindowControllerImplTest, TEST_F(CandidateWindowControllerImplTest,
ConvertLookupTableToInfolistEntryTest_DenseCase) { ConvertLookupTableToInfolistEntryTest_DenseCase) {
ui::CandidateWindow candidate_window; CandidateWindow candidate_window;
candidate_window.set_page_size(10); candidate_window.set_page_size(10);
for (size_t i = 0; i < kSampleCandidateSize; ++i) { for (size_t i = 0; i < kSampleCandidateSize; ++i) {
ui::CandidateWindow::Entry entry; CandidateWindow::Entry entry;
entry.value = kSampleCandidate[i]; entry.value = kSampleCandidate[i];
entry.description_title = kSampleDescriptionTitle[i]; entry.description_title = kSampleDescriptionTitle[i];
entry.description_body = kSampleDescriptionBody[i]; entry.description_body = kSampleDescriptionBody[i];
...@@ -84,15 +84,15 @@ TEST_F(CandidateWindowControllerImplTest, ...@@ -84,15 +84,15 @@ TEST_F(CandidateWindowControllerImplTest,
TEST_F(CandidateWindowControllerImplTest, TEST_F(CandidateWindowControllerImplTest,
ConvertLookupTableToInfolistEntryTest_SparseCase) { ConvertLookupTableToInfolistEntryTest_SparseCase) {
ui::CandidateWindow candidate_window; CandidateWindow candidate_window;
candidate_window.set_page_size(10); candidate_window.set_page_size(10);
for (size_t i = 0; i < kSampleCandidateSize; ++i) { for (size_t i = 0; i < kSampleCandidateSize; ++i) {
ui::CandidateWindow::Entry entry; CandidateWindow::Entry entry;
entry.value = kSampleCandidate[i]; entry.value = kSampleCandidate[i];
candidate_window.mutable_candidates()->push_back(entry); candidate_window.mutable_candidates()->push_back(entry);
} }
std::vector<ui::CandidateWindow::Entry>* candidates = std::vector<CandidateWindow::Entry>* candidates =
candidate_window.mutable_candidates(); candidate_window.mutable_candidates();
(*candidates)[2].description_title = kSampleDescriptionTitle[2]; (*candidates)[2].description_title = kSampleDescriptionTitle[2];
(*candidates)[2].description_body = kSampleDescriptionBody[2]; (*candidates)[2].description_body = kSampleDescriptionBody[2];
...@@ -115,16 +115,16 @@ TEST_F(CandidateWindowControllerImplTest, ...@@ -115,16 +115,16 @@ TEST_F(CandidateWindowControllerImplTest,
TEST_F(CandidateWindowControllerImplTest, TEST_F(CandidateWindowControllerImplTest,
ConvertLookupTableToInfolistEntryTest_SparseNoSelectionCase) { ConvertLookupTableToInfolistEntryTest_SparseNoSelectionCase) {
ui::CandidateWindow candidate_window; CandidateWindow candidate_window;
candidate_window.set_page_size(10); candidate_window.set_page_size(10);
for (size_t i = 0; i < kSampleCandidateSize; ++i) { for (size_t i = 0; i < kSampleCandidateSize; ++i) {
ui::CandidateWindow::Entry entry; CandidateWindow::Entry entry;
entry.value = kSampleCandidate[i]; entry.value = kSampleCandidate[i];
candidate_window.mutable_candidates()->push_back(entry); candidate_window.mutable_candidates()->push_back(entry);
} }
std::vector<ui::CandidateWindow::Entry>* candidates = std::vector<CandidateWindow::Entry>* candidates =
candidate_window.mutable_candidates(); candidate_window.mutable_candidates();
(*candidates)[2].description_title = kSampleDescriptionTitle[2]; (*candidates)[2].description_title = kSampleDescriptionTitle[2];
(*candidates)[2].description_body = kSampleDescriptionBody[2]; (*candidates)[2].description_body = kSampleDescriptionBody[2];
...@@ -148,11 +148,11 @@ TEST_F(CandidateWindowControllerImplTest, ...@@ -148,11 +148,11 @@ TEST_F(CandidateWindowControllerImplTest,
TEST_F(CandidateWindowControllerImplTest, TEST_F(CandidateWindowControllerImplTest,
ConvertLookupTableToInfolistEntryTest_NoInfolistCase) { ConvertLookupTableToInfolistEntryTest_NoInfolistCase) {
ui::CandidateWindow candidate_window; CandidateWindow candidate_window;
candidate_window.set_page_size(10); candidate_window.set_page_size(10);
for (size_t i = 0; i < kSampleCandidateSize; ++i) { for (size_t i = 0; i < kSampleCandidateSize; ++i) {
ui::CandidateWindow::Entry entry; CandidateWindow::Entry entry;
entry.value = kSampleCandidate[i]; entry.value = kSampleCandidate[i];
candidate_window.mutable_candidates()->push_back(entry); candidate_window.mutable_candidates()->push_back(entry);
} }
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "chrome/browser/chromeos/input_method/candidate_view.h" #include "chrome/browser/chromeos/input_method/candidate_view.h"
#include "chrome/browser/chromeos/input_method/candidate_window_constants.h" #include "chrome/browser/chromeos/input_method/candidate_window_constants.h"
#include "chromeos/ime/candidate_window.h"
#include "ui/gfx/color_utils.h" #include "ui/gfx/color_utils.h"
#include "ui/gfx/screen.h" #include "ui/gfx/screen.h"
#include "ui/native_theme/native_theme.h" #include "ui/native_theme/native_theme.h"
...@@ -74,7 +75,7 @@ class CandidateWindowBorder : public views::BubbleBorder { ...@@ -74,7 +75,7 @@ class CandidateWindowBorder : public views::BubbleBorder {
// Computes the page index. For instance, if the page size is 9, and the // Computes the page index. For instance, if the page size is 9, and the
// cursor is pointing to 13th candidate, the page index will be 1 (2nd // cursor is pointing to 13th candidate, the page index will be 1 (2nd
// page, as the index is zero-origin). Returns -1 on error. // page, as the index is zero-origin). Returns -1 on error.
int ComputePageIndex(const ui::CandidateWindow& candidate_window) { int ComputePageIndex(const CandidateWindow& candidate_window) {
if (candidate_window.page_size() > 0) if (candidate_window.page_size() > 0)
return candidate_window.cursor_position() / candidate_window.page_size(); return candidate_window.cursor_position() / candidate_window.page_size();
return -1; return -1;
...@@ -163,7 +164,7 @@ CandidateWindowView::CandidateWindowView(gfx::NativeView parent) ...@@ -163,7 +164,7 @@ CandidateWindowView::CandidateWindowView(gfx::NativeView parent)
preedit_->SetVisible(false); preedit_->SetVisible(false);
candidate_area_->SetVisible(false); candidate_area_->SetVisible(false);
preedit_->SetBorder(InformationTextArea::BOTTOM); preedit_->SetBorder(InformationTextArea::BOTTOM);
if (candidate_window_.orientation() == ui::CandidateWindow::VERTICAL) { if (candidate_window_.orientation() == CandidateWindow::VERTICAL) {
AddChildView(preedit_); AddChildView(preedit_);
AddChildView(candidate_area_); AddChildView(candidate_area_);
AddChildView(auxiliary_text_); AddChildView(auxiliary_text_);
...@@ -231,13 +232,13 @@ void CandidateWindowView::ShowLookupTable() { ...@@ -231,13 +232,13 @@ void CandidateWindowView::ShowLookupTable() {
} }
void CandidateWindowView::UpdateCandidates( void CandidateWindowView::UpdateCandidates(
const ui::CandidateWindow& new_candidate_window) { const CandidateWindow& new_candidate_window) {
// Updating the candidate views is expensive. We'll skip this if possible. // Updating the candidate views is expensive. We'll skip this if possible.
if (!candidate_window_.IsEqual(new_candidate_window)) { if (!candidate_window_.IsEqual(new_candidate_window)) {
if (candidate_window_.orientation() != new_candidate_window.orientation()) { if (candidate_window_.orientation() != new_candidate_window.orientation()) {
// If the new layout is vertical, the aux text should appear at the // If the new layout is vertical, the aux text should appear at the
// bottom. If horizontal, it should appear between preedit and candidates. // bottom. If horizontal, it should appear between preedit and candidates.
if (new_candidate_window.orientation() == ui::CandidateWindow::VERTICAL) { if (new_candidate_window.orientation() == CandidateWindow::VERTICAL) {
ReorderChildView(auxiliary_text_, -1); ReorderChildView(auxiliary_text_, -1);
auxiliary_text_->SetAlignment(gfx::ALIGN_RIGHT); auxiliary_text_->SetAlignment(gfx::ALIGN_RIGHT);
auxiliary_text_->SetBorder(InformationTextArea::TOP); auxiliary_text_->SetBorder(InformationTextArea::TOP);
...@@ -274,18 +275,18 @@ void CandidateWindowView::UpdateCandidates( ...@@ -274,18 +275,18 @@ void CandidateWindowView::UpdateCandidates(
CandidateView* candidate_view = candidate_views_[index_in_page]; CandidateView* candidate_view = candidate_views_[index_in_page];
// Set the candidate text. // Set the candidate text.
if (candidate_index < new_candidate_window.candidates().size()) { if (candidate_index < new_candidate_window.candidates().size()) {
const ui::CandidateWindow::Entry& entry = const CandidateWindow::Entry& entry =
new_candidate_window.candidates()[candidate_index]; new_candidate_window.candidates()[candidate_index];
candidate_view->SetEntry(entry); candidate_view->SetEntry(entry);
candidate_view->SetState(views::Button::STATE_NORMAL); candidate_view->SetState(views::Button::STATE_NORMAL);
candidate_view->SetInfolistIcon(!entry.description_title.empty()); candidate_view->SetInfolistIcon(!entry.description_title.empty());
} else { } else {
// Disable the empty row. // Disable the empty row.
candidate_view->SetEntry(ui::CandidateWindow::Entry()); candidate_view->SetEntry(CandidateWindow::Entry());
candidate_view->SetState(views::Button::STATE_DISABLED); candidate_view->SetState(views::Button::STATE_DISABLED);
candidate_view->SetInfolistIcon(false); candidate_view->SetInfolistIcon(false);
} }
if (new_candidate_window.orientation() == ui::CandidateWindow::VERTICAL) { if (new_candidate_window.orientation() == CandidateWindow::VERTICAL) {
int shortcut_width = 0; int shortcut_width = 0;
int candidate_width = 0; int candidate_width = 0;
candidate_views_[i]->GetPreferredWidths( candidate_views_[i]->GetPreferredWidths(
...@@ -294,14 +295,14 @@ void CandidateWindowView::UpdateCandidates( ...@@ -294,14 +295,14 @@ void CandidateWindowView::UpdateCandidates(
max_candidate_width = std::max(max_candidate_width, candidate_width); max_candidate_width = std::max(max_candidate_width, candidate_width);
} }
} }
if (new_candidate_window.orientation() == ui::CandidateWindow::VERTICAL) { if (new_candidate_window.orientation() == CandidateWindow::VERTICAL) {
for (size_t i = 0; i < candidate_views_.size(); ++i) for (size_t i = 0; i < candidate_views_.size(); ++i)
candidate_views_[i]->SetWidths(max_shortcut_width, max_candidate_width); candidate_views_[i]->SetWidths(max_shortcut_width, max_candidate_width);
} }
CandidateWindowBorder* border = static_cast<CandidateWindowBorder*>( CandidateWindowBorder* border = static_cast<CandidateWindowBorder*>(
GetBubbleFrameView()->bubble_border()); GetBubbleFrameView()->bubble_border());
if (new_candidate_window.orientation() == ui::CandidateWindow::VERTICAL) if (new_candidate_window.orientation() == CandidateWindow::VERTICAL)
border->set_offset(max_shortcut_width); border->set_offset(max_shortcut_width);
else else
border->set_offset(0); border->set_offset(0);
...@@ -342,8 +343,8 @@ void CandidateWindowView::SetCursorBounds(const gfx::Rect& cursor_bounds, ...@@ -342,8 +343,8 @@ void CandidateWindowView::SetCursorBounds(const gfx::Rect& cursor_bounds,
} }
void CandidateWindowView::MaybeInitializeCandidateViews( void CandidateWindowView::MaybeInitializeCandidateViews(
const ui::CandidateWindow& candidate_window) { const CandidateWindow& candidate_window) {
const ui::CandidateWindow::Orientation orientation = const CandidateWindow::Orientation orientation =
candidate_window.orientation(); candidate_window.orientation();
const size_t page_size = candidate_window.page_size(); const size_t page_size = candidate_window.page_size();
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_
#define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_ #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_CANDIDATE_WINDOW_VIEW_H_
#include "ui/base/ime/candidate_window.h" #include "chromeos/ime/candidate_window.h"
#include "ui/views/bubble/bubble_delegate.h" #include "ui/views/bubble/bubble_delegate.h"
#include "ui/views/controls/button/button.h" #include "ui/views/controls/button/button.h"
...@@ -64,7 +64,7 @@ class CandidateWindowView : public views::BubbleDelegateView, ...@@ -64,7 +64,7 @@ class CandidateWindowView : public views::BubbleDelegateView,
// Updates candidates of the candidate window from |candidate_window|. // Updates candidates of the candidate window from |candidate_window|.
// Candidates are arranged per |orientation|. // Candidates are arranged per |orientation|.
void UpdateCandidates(const ui::CandidateWindow& candidate_window); void UpdateCandidates(const CandidateWindow& candidate_window);
void SetCursorBounds(const gfx::Rect& cursor_bounds, void SetCursorBounds(const gfx::Rect& cursor_bounds,
const gfx::Rect& composition_head); const gfx::Rect& composition_head);
...@@ -80,11 +80,10 @@ class CandidateWindowView : public views::BubbleDelegateView, ...@@ -80,11 +80,10 @@ class CandidateWindowView : public views::BubbleDelegateView,
void UpdateVisibility(); void UpdateVisibility();
// Initializes the candidate views if needed. // Initializes the candidate views if needed.
void MaybeInitializeCandidateViews( void MaybeInitializeCandidateViews(const CandidateWindow& candidate_window);
const ui::CandidateWindow& candidate_window);
// The candidate window data model. // The candidate window data model.
ui::CandidateWindow candidate_window_; CandidateWindow candidate_window_;
// The index in the current page of the candidate currently being selected. // The index in the current page of the candidate currently being selected.
int selected_candidate_index_in_page_; int selected_candidate_index_in_page_;
......
...@@ -39,19 +39,19 @@ const char* kSampleDescriptionBody[] = { ...@@ -39,19 +39,19 @@ const char* kSampleDescriptionBody[] = {
}; };
void InitCandidateWindow(size_t page_size, void InitCandidateWindow(size_t page_size,
ui::CandidateWindow* candidate_window) { CandidateWindow* candidate_window) {
candidate_window->set_cursor_position(0); candidate_window->set_cursor_position(0);
candidate_window->set_page_size(page_size); candidate_window->set_page_size(page_size);
candidate_window->mutable_candidates()->clear(); candidate_window->mutable_candidates()->clear();
candidate_window->set_orientation(ui::CandidateWindow::VERTICAL); candidate_window->set_orientation(CandidateWindow::VERTICAL);
} }
void InitCandidateWindowWithCandidatesFilled( void InitCandidateWindowWithCandidatesFilled(
size_t page_size, size_t page_size,
ui::CandidateWindow* candidate_window) { CandidateWindow* candidate_window) {
InitCandidateWindow(page_size, candidate_window); InitCandidateWindow(page_size, candidate_window);
for (size_t i = 0; i < page_size; ++i) { for (size_t i = 0; i < page_size; ++i) {
ui::CandidateWindow::Entry entry; CandidateWindow::Entry entry;
entry.value = base::StringPrintf("value %lld", entry.value = base::StringPrintf("value %lld",
static_cast<unsigned long long>(i)); static_cast<unsigned long long>(i));
entry.label = base::StringPrintf("%lld", entry.label = base::StringPrintf("%lld",
...@@ -94,8 +94,7 @@ class CandidateWindowViewTest : public views::ViewsTestBase { ...@@ -94,8 +94,7 @@ class CandidateWindowViewTest : public views::ViewsTestBase {
candidate_window_view_->SelectCandidateAt(index_in_page); candidate_window_view_->SelectCandidateAt(index_in_page);
} }
void MaybeInitializeCandidateViews( void MaybeInitializeCandidateViews(const CandidateWindow& candidate_window) {
const ui::CandidateWindow& candidate_window) {
candidate_window_view_->MaybeInitializeCandidateViews(candidate_window); candidate_window_view_->MaybeInitializeCandidateViews(candidate_window);
} }
...@@ -117,7 +116,7 @@ class CandidateWindowViewTest : public views::ViewsTestBase { ...@@ -117,7 +116,7 @@ class CandidateWindowViewTest : public views::ViewsTestBase {
TEST_F(CandidateWindowViewTest, UpdateCandidatesTest_CursorVisibility) { TEST_F(CandidateWindowViewTest, UpdateCandidatesTest_CursorVisibility) {
// Visible (by default) cursor. // Visible (by default) cursor.
ui::CandidateWindow candidate_window; CandidateWindow candidate_window;
const int candidate_window_size = 9; const int candidate_window_size = 9;
InitCandidateWindowWithCandidatesFilled(candidate_window_size, InitCandidateWindowWithCandidatesFilled(candidate_window_size,
&candidate_window); &candidate_window);
...@@ -142,7 +141,7 @@ TEST_F(CandidateWindowViewTest, UpdateCandidatesTest_CursorVisibility) { ...@@ -142,7 +141,7 @@ TEST_F(CandidateWindowViewTest, UpdateCandidatesTest_CursorVisibility) {
TEST_F(CandidateWindowViewTest, SelectCandidateAtTest) { TEST_F(CandidateWindowViewTest, SelectCandidateAtTest) {
// Set 9 candidates. // Set 9 candidates.
ui::CandidateWindow candidate_window_large; CandidateWindow candidate_window_large;
const int candidate_window_large_size = 9; const int candidate_window_large_size = 9;
InitCandidateWindowWithCandidatesFilled(candidate_window_large_size, InitCandidateWindowWithCandidatesFilled(candidate_window_large_size,
&candidate_window_large); &candidate_window_large);
...@@ -153,7 +152,7 @@ TEST_F(CandidateWindowViewTest, SelectCandidateAtTest) { ...@@ -153,7 +152,7 @@ TEST_F(CandidateWindowViewTest, SelectCandidateAtTest) {
SelectCandidateAt(candidate_window_large_size - 1); SelectCandidateAt(candidate_window_large_size - 1);
// Reduce the number of candidates to 3. // Reduce the number of candidates to 3.
ui::CandidateWindow candidate_window_small; CandidateWindow candidate_window_small;
const int candidate_window_small_size = 3; const int candidate_window_small_size = 3;
InitCandidateWindowWithCandidatesFilled(candidate_window_small_size, InitCandidateWindowWithCandidatesFilled(candidate_window_small_size,
&candidate_window_small); &candidate_window_small);
...@@ -173,7 +172,7 @@ TEST_F(CandidateWindowViewTest, ShortcutSettingTest) { ...@@ -173,7 +172,7 @@ TEST_F(CandidateWindowViewTest, ShortcutSettingTest) {
SCOPED_TRACE("candidate_views allocation test"); SCOPED_TRACE("candidate_views allocation test");
const size_t kMaxPageSize = 16; const size_t kMaxPageSize = 16;
for (size_t i = 1; i < kMaxPageSize; ++i) { for (size_t i = 1; i < kMaxPageSize; ++i) {
ui::CandidateWindow candidate_window; CandidateWindow candidate_window;
InitCandidateWindow(i, &candidate_window); InitCandidateWindow(i, &candidate_window);
candidate_window_view()->UpdateCandidates(candidate_window); candidate_window_view()->UpdateCandidates(candidate_window);
EXPECT_EQ(i, GetCandidatesSize()); EXPECT_EQ(i, GetCandidatesSize());
...@@ -182,12 +181,12 @@ TEST_F(CandidateWindowViewTest, ShortcutSettingTest) { ...@@ -182,12 +181,12 @@ TEST_F(CandidateWindowViewTest, ShortcutSettingTest) {
{ {
SCOPED_TRACE("Empty string for each labels expects empty labels(vertical)"); SCOPED_TRACE("Empty string for each labels expects empty labels(vertical)");
const size_t kPageSize = 3; const size_t kPageSize = 3;
ui::CandidateWindow candidate_window; CandidateWindow candidate_window;
InitCandidateWindow(kPageSize, &candidate_window); InitCandidateWindow(kPageSize, &candidate_window);
candidate_window.set_orientation(ui::CandidateWindow::VERTICAL); candidate_window.set_orientation(CandidateWindow::VERTICAL);
for (size_t i = 0; i < kPageSize; ++i) { for (size_t i = 0; i < kPageSize; ++i) {
ui::CandidateWindow::Entry entry; CandidateWindow::Entry entry;
entry.value = kSampleCandidate[i]; entry.value = kSampleCandidate[i];
entry.annotation = kSampleAnnotation[i]; entry.annotation = kSampleAnnotation[i];
entry.description_title = kSampleDescriptionTitle[i]; entry.description_title = kSampleDescriptionTitle[i];
...@@ -208,12 +207,12 @@ TEST_F(CandidateWindowViewTest, ShortcutSettingTest) { ...@@ -208,12 +207,12 @@ TEST_F(CandidateWindowViewTest, ShortcutSettingTest) {
SCOPED_TRACE( SCOPED_TRACE(
"Empty string for each labels expect empty labels(horizontal)"); "Empty string for each labels expect empty labels(horizontal)");
const size_t kPageSize = 3; const size_t kPageSize = 3;
ui::CandidateWindow candidate_window; CandidateWindow candidate_window;
InitCandidateWindow(kPageSize, &candidate_window); InitCandidateWindow(kPageSize, &candidate_window);
candidate_window.set_orientation(ui::CandidateWindow::HORIZONTAL); candidate_window.set_orientation(CandidateWindow::HORIZONTAL);
for (size_t i = 0; i < kPageSize; ++i) { for (size_t i = 0; i < kPageSize; ++i) {
ui::CandidateWindow::Entry entry; CandidateWindow::Entry entry;
entry.value = kSampleCandidate[i]; entry.value = kSampleCandidate[i];
entry.annotation = kSampleAnnotation[i]; entry.annotation = kSampleAnnotation[i];
entry.description_title = kSampleDescriptionTitle[i]; entry.description_title = kSampleDescriptionTitle[i];
...@@ -234,12 +233,12 @@ TEST_F(CandidateWindowViewTest, ShortcutSettingTest) { ...@@ -234,12 +233,12 @@ TEST_F(CandidateWindowViewTest, ShortcutSettingTest) {
{ {
SCOPED_TRACE("Vertical customized label case"); SCOPED_TRACE("Vertical customized label case");
const size_t kPageSize = 3; const size_t kPageSize = 3;
ui::CandidateWindow candidate_window; CandidateWindow candidate_window;
InitCandidateWindow(kPageSize, &candidate_window); InitCandidateWindow(kPageSize, &candidate_window);
candidate_window.set_orientation(ui::CandidateWindow::VERTICAL); candidate_window.set_orientation(CandidateWindow::VERTICAL);
for (size_t i = 0; i < kPageSize; ++i) { for (size_t i = 0; i < kPageSize; ++i) {
ui::CandidateWindow::Entry entry; CandidateWindow::Entry entry;
entry.value = kSampleCandidate[i]; entry.value = kSampleCandidate[i];
entry.annotation = kSampleAnnotation[i]; entry.annotation = kSampleAnnotation[i];
entry.description_title = kSampleDescriptionTitle[i]; entry.description_title = kSampleDescriptionTitle[i];
...@@ -262,12 +261,12 @@ TEST_F(CandidateWindowViewTest, ShortcutSettingTest) { ...@@ -262,12 +261,12 @@ TEST_F(CandidateWindowViewTest, ShortcutSettingTest) {
{ {
SCOPED_TRACE("Horizontal customized label case"); SCOPED_TRACE("Horizontal customized label case");
const size_t kPageSize = 3; const size_t kPageSize = 3;
ui::CandidateWindow candidate_window; CandidateWindow candidate_window;
InitCandidateWindow(kPageSize, &candidate_window); InitCandidateWindow(kPageSize, &candidate_window);
candidate_window.set_orientation(ui::CandidateWindow::HORIZONTAL); candidate_window.set_orientation(CandidateWindow::HORIZONTAL);
for (size_t i = 0; i < kPageSize; ++i) { for (size_t i = 0; i < kPageSize; ++i) {
ui::CandidateWindow::Entry entry; CandidateWindow::Entry entry;
entry.value = kSampleCandidate[i]; entry.value = kSampleCandidate[i];
entry.annotation = kSampleAnnotation[i]; entry.annotation = kSampleAnnotation[i];
entry.description_title = kSampleDescriptionTitle[i]; entry.description_title = kSampleDescriptionTitle[i];
...@@ -291,8 +290,8 @@ TEST_F(CandidateWindowViewTest, ShortcutSettingTest) { ...@@ -291,8 +290,8 @@ TEST_F(CandidateWindowViewTest, ShortcutSettingTest) {
TEST_F(CandidateWindowViewTest, DoNotChangeRowHeightWithLabelSwitchTest) { TEST_F(CandidateWindowViewTest, DoNotChangeRowHeightWithLabelSwitchTest) {
const size_t kPageSize = 10; const size_t kPageSize = 10;
ui::CandidateWindow candidate_window; CandidateWindow candidate_window;
ui::CandidateWindow no_shortcut_candidate_window; CandidateWindow no_shortcut_candidate_window;
const char kSampleCandidate1[] = "Sample String 1"; const char kSampleCandidate1[] = "Sample String 1";
const char kSampleCandidate2[] = "\xE3\x81\x82"; // multi byte string. const char kSampleCandidate2[] = "\xE3\x81\x82"; // multi byte string.
...@@ -312,10 +311,10 @@ TEST_F(CandidateWindowViewTest, DoNotChangeRowHeightWithLabelSwitchTest) { ...@@ -312,10 +311,10 @@ TEST_F(CandidateWindowViewTest, DoNotChangeRowHeightWithLabelSwitchTest) {
candidate_window.set_cursor_position(0); candidate_window.set_cursor_position(0);
candidate_window.set_page_size(3); candidate_window.set_page_size(3);
candidate_window.mutable_candidates()->clear(); candidate_window.mutable_candidates()->clear();
candidate_window.set_orientation(ui::CandidateWindow::VERTICAL); candidate_window.set_orientation(CandidateWindow::VERTICAL);
no_shortcut_candidate_window.CopyFrom(candidate_window); no_shortcut_candidate_window.CopyFrom(candidate_window);
ui::CandidateWindow::Entry entry; CandidateWindow::Entry entry;
entry.value = kSampleCandidate1; entry.value = kSampleCandidate1;
entry.annotation = kSampleAnnotation1; entry.annotation = kSampleAnnotation1;
candidate_window.mutable_candidates()->push_back(entry); candidate_window.mutable_candidates()->push_back(entry);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "chromeos/ime/candidate_window.h"
#include "chromeos/ime/component_extension_ime_manager.h" #include "chromeos/ime/component_extension_ime_manager.h"
#include "chromeos/ime/extension_ime_util.h" #include "chromeos/ime/extension_ime_util.h"
#include "chromeos/ime/ibus_keymap.h" #include "chromeos/ime/ibus_keymap.h"
...@@ -27,7 +28,6 @@ ...@@ -27,7 +28,6 @@
#include "chromeos/ime/input_method_manager.h" #include "chromeos/ime/input_method_manager.h"
#include "ui/aura/root_window.h" #include "ui/aura/root_window.h"
#include "ui/aura/window.h" #include "ui/aura/window.h"
#include "ui/base/ime/candidate_window.h"
#include "ui/events/event.h" #include "ui/events/event.h"
#include "ui/events/keycodes/dom4/keycode_converter.h" #include "ui/events/keycodes/dom4/keycode_converter.h"
#include "ui/events/keycodes/keyboard_code_conversion_x.h" #include "ui/events/keycodes/keyboard_code_conversion_x.h"
...@@ -61,7 +61,7 @@ InputMethodEngine::InputMethodEngine() ...@@ -61,7 +61,7 @@ InputMethodEngine::InputMethodEngine()
observer_(NULL), observer_(NULL),
preedit_text_(new IBusText()), preedit_text_(new IBusText()),
preedit_cursor_(0), preedit_cursor_(0),
candidate_window_(new ui::CandidateWindow()), candidate_window_(new input_method::CandidateWindow()),
window_visible_(false) {} window_visible_(false) {}
InputMethodEngine::~InputMethodEngine() { InputMethodEngine::~InputMethodEngine() {
...@@ -254,7 +254,7 @@ void InputMethodEngine::SetCandidateWindowProperty( ...@@ -254,7 +254,7 @@ void InputMethodEngine::SetCandidateWindowProperty(
const CandidateWindowProperty& property) { const CandidateWindowProperty& property) {
// Type conversion from InputMethodEngineInterface::CandidateWindowProperty to // Type conversion from InputMethodEngineInterface::CandidateWindowProperty to
// CandidateWindow::CandidateWindowProperty defined in chromeos/ime/. // CandidateWindow::CandidateWindowProperty defined in chromeos/ime/.
ui::CandidateWindow::CandidateWindowProperty dest_property; input_method::CandidateWindow::CandidateWindowProperty dest_property;
dest_property.page_size = property.page_size; dest_property.page_size = property.page_size;
dest_property.is_cursor_visible = property.is_cursor_visible; dest_property.is_cursor_visible = property.is_cursor_visible;
dest_property.is_vertical = property.is_vertical; dest_property.is_vertical = property.is_vertical;
...@@ -310,7 +310,7 @@ bool InputMethodEngine::SetCandidates( ...@@ -310,7 +310,7 @@ bool InputMethodEngine::SetCandidates(
candidate_window_->mutable_candidates()->clear(); candidate_window_->mutable_candidates()->clear();
for (std::vector<Candidate>::const_iterator ix = candidates.begin(); for (std::vector<Candidate>::const_iterator ix = candidates.begin();
ix != candidates.end(); ++ix) { ix != candidates.end(); ++ix) {
ui::CandidateWindow::Entry entry; input_method::CandidateWindow::Entry entry;
entry.value = ix->value; entry.value = ix->value;
entry.label = ix->label; entry.label = ix->label;
entry.annotation = ix->annotation; entry.annotation = ix->annotation;
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include "url/gurl.h" #include "url/gurl.h"
namespace ui { namespace ui {
class CandidateWindow;
class KeyEvent; class KeyEvent;
} // namespace ui } // namespace ui
...@@ -22,6 +21,7 @@ namespace chromeos { ...@@ -22,6 +21,7 @@ namespace chromeos {
class IBusText; class IBusText;
namespace input_method { namespace input_method {
class CandidateWindow;
struct InputMethodProperty; struct InputMethodProperty;
struct KeyEventHandle; struct KeyEventHandle;
} // namespace input_method } // namespace input_method
...@@ -128,7 +128,7 @@ class InputMethodEngine : public InputMethodEngineInterface { ...@@ -128,7 +128,7 @@ class InputMethodEngine : public InputMethodEngineInterface {
int preedit_cursor_; int preedit_cursor_;
// The current candidate window. // The current candidate window.
scoped_ptr<ui::CandidateWindow> candidate_window_; scoped_ptr<input_method::CandidateWindow> candidate_window_;
// The current candidate window property. // The current candidate window property.
CandidateWindowProperty candidate_window_property_; CandidateWindowProperty candidate_window_property_;
......
...@@ -537,7 +537,7 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, ...@@ -537,7 +537,7 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest,
EXPECT_TRUE( EXPECT_TRUE(
mock_candidate_window->last_update_lookup_table_arg().is_visible); mock_candidate_window->last_update_lookup_table_arg().is_visible);
const ui::CandidateWindow& table = const CandidateWindow& table =
mock_candidate_window->last_update_lookup_table_arg().lookup_table; mock_candidate_window->last_update_lookup_table_arg().lookup_table;
EXPECT_TRUE(table.is_cursor_visible()); EXPECT_TRUE(table.is_cursor_visible());
} }
...@@ -562,13 +562,13 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, ...@@ -562,13 +562,13 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest,
EXPECT_TRUE( EXPECT_TRUE(
mock_candidate_window->last_update_lookup_table_arg().is_visible); mock_candidate_window->last_update_lookup_table_arg().is_visible);
const ui::CandidateWindow& table = const CandidateWindow& table =
mock_candidate_window->last_update_lookup_table_arg().lookup_table; mock_candidate_window->last_update_lookup_table_arg().lookup_table;
// cursor visibility is kept as before. // cursor visibility is kept as before.
EXPECT_TRUE(table.is_cursor_visible()); EXPECT_TRUE(table.is_cursor_visible());
EXPECT_EQ(ui::CandidateWindow::VERTICAL, table.orientation()); EXPECT_EQ(CandidateWindow::VERTICAL, table.orientation());
} }
{ {
SCOPED_TRACE("setCandidateWindowProperties:pageSize test"); SCOPED_TRACE("setCandidateWindowProperties:pageSize test");
...@@ -591,14 +591,14 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, ...@@ -591,14 +591,14 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest,
EXPECT_TRUE( EXPECT_TRUE(
mock_candidate_window->last_update_lookup_table_arg().is_visible); mock_candidate_window->last_update_lookup_table_arg().is_visible);
const ui::CandidateWindow& table = const CandidateWindow& table =
mock_candidate_window->last_update_lookup_table_arg().lookup_table; mock_candidate_window->last_update_lookup_table_arg().lookup_table;
// cursor visibility is kept as before. // cursor visibility is kept as before.
EXPECT_TRUE(table.is_cursor_visible()); EXPECT_TRUE(table.is_cursor_visible());
// oritantation is kept as before. // oritantation is kept as before.
EXPECT_EQ(ui::CandidateWindow::VERTICAL, table.orientation()); EXPECT_EQ(CandidateWindow::VERTICAL, table.orientation());
EXPECT_EQ(7U, table.page_size()); EXPECT_EQ(7U, table.page_size());
} }
...@@ -619,7 +619,7 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, ...@@ -619,7 +619,7 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest,
set_candidate_window_properties_test_script)); set_candidate_window_properties_test_script));
EXPECT_EQ(1, mock_candidate_window->update_lookup_table_call_count()); EXPECT_EQ(1, mock_candidate_window->update_lookup_table_call_count());
const ui::CandidateWindow& table = const input_method::CandidateWindow& table =
mock_candidate_window->last_update_lookup_table_arg().lookup_table; mock_candidate_window->last_update_lookup_table_arg().lookup_table;
EXPECT_TRUE(table.is_auxiliary_text_visible()); EXPECT_TRUE(table.is_auxiliary_text_visible());
} }
...@@ -641,7 +641,7 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, ...@@ -641,7 +641,7 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest,
EXPECT_EQ(1, mock_candidate_window->update_lookup_table_call_count()); EXPECT_EQ(1, mock_candidate_window->update_lookup_table_call_count());
// aux text visibility is kept as before. // aux text visibility is kept as before.
const ui::CandidateWindow& table = const input_method::CandidateWindow& table =
mock_candidate_window->last_update_lookup_table_arg().lookup_table; mock_candidate_window->last_update_lookup_table_arg().lookup_table;
EXPECT_TRUE(table.is_auxiliary_text_visible()); EXPECT_TRUE(table.is_auxiliary_text_visible());
EXPECT_EQ("AUXILIARY_TEXT", table.auxiliary_text()); EXPECT_EQ("AUXILIARY_TEXT", table.auxiliary_text());
...@@ -684,14 +684,14 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, ...@@ -684,14 +684,14 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest,
EXPECT_TRUE( EXPECT_TRUE(
mock_candidate_window->last_update_lookup_table_arg().is_visible); mock_candidate_window->last_update_lookup_table_arg().is_visible);
const ui::CandidateWindow& table = const CandidateWindow& table =
mock_candidate_window->last_update_lookup_table_arg().lookup_table; mock_candidate_window->last_update_lookup_table_arg().lookup_table;
// cursor visibility is kept as before. // cursor visibility is kept as before.
EXPECT_TRUE(table.is_cursor_visible()); EXPECT_TRUE(table.is_cursor_visible());
// oritantation is kept as before. // oritantation is kept as before.
EXPECT_EQ(ui::CandidateWindow::VERTICAL, table.orientation()); EXPECT_EQ(CandidateWindow::VERTICAL, table.orientation());
// page size is kept as before. // page size is kept as before.
EXPECT_EQ(7U, table.page_size()); EXPECT_EQ(7U, table.page_size());
...@@ -731,14 +731,14 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest, ...@@ -731,14 +731,14 @@ IN_PROC_BROWSER_TEST_P(InputMethodEngineIBusBrowserTest,
EXPECT_TRUE( EXPECT_TRUE(
mock_candidate_window->last_update_lookup_table_arg().is_visible); mock_candidate_window->last_update_lookup_table_arg().is_visible);
const ui::CandidateWindow& table = const CandidateWindow& table =
mock_candidate_window->last_update_lookup_table_arg().lookup_table; mock_candidate_window->last_update_lookup_table_arg().lookup_table;
// cursor visibility is kept as before. // cursor visibility is kept as before.
EXPECT_TRUE(table.is_cursor_visible()); EXPECT_TRUE(table.is_cursor_visible());
// oritantation is kept as before. // oritantation is kept as before.
EXPECT_EQ(ui::CandidateWindow::VERTICAL, table.orientation()); EXPECT_EQ(CandidateWindow::VERTICAL, table.orientation());
// page size is kept as before. // page size is kept as before.
EXPECT_EQ(7U, table.page_size()); EXPECT_EQ(7U, table.page_size());
......
...@@ -210,6 +210,8 @@ ...@@ -210,6 +210,8 @@
'display/output_util.h', 'display/output_util.h',
'display/real_output_configurator_delegate.cc', 'display/real_output_configurator_delegate.cc',
'display/real_output_configurator_delegate.h', 'display/real_output_configurator_delegate.h',
'ime/candidate_window.cc',
'ime/candidate_window.h',
'ime/component_extension_ime_manager.cc', 'ime/component_extension_ime_manager.cc',
'ime/component_extension_ime_manager.h', 'ime/component_extension_ime_manager.h',
'ime/extension_ime_util.cc', 'ime/extension_ime_util.cc',
...@@ -487,6 +489,7 @@ ...@@ -487,6 +489,7 @@
'disks/disk_mount_manager_unittest.cc', 'disks/disk_mount_manager_unittest.cc',
'display/output_configurator_unittest.cc', 'display/output_configurator_unittest.cc',
'display/output_util_unittest.cc', 'display/output_util_unittest.cc',
'ime/candidate_window_unittest.cc',
'ime/component_extension_ime_manager_unittest.cc', 'ime/component_extension_ime_manager_unittest.cc',
'ime/extension_ime_util_unittest.cc', 'ime/extension_ime_util_unittest.cc',
'ime/ibus_text_unittest.cc', 'ime/ibus_text_unittest.cc',
......
// Copyright 2014 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 // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "ui/base/ime/candidate_window.h" #include "chromeos/ime/candidate_window.h"
#include <string> #include <string>
#include "base/logging.h" #include "base/logging.h"
#include "base/values.h" #include "base/values.h"
namespace ui { namespace chromeos {
namespace input_method {
namespace { namespace {
// The default entry number of a page in CandidateWindow. // The default entry number of a page in CandidateWindow.
...@@ -73,4 +74,5 @@ CandidateWindow::Entry::Entry() { ...@@ -73,4 +74,5 @@ CandidateWindow::Entry::Entry() {
CandidateWindow::Entry::~Entry() { CandidateWindow::Entry::~Entry() {
} }
} // namespace ui } // namespace input_method
} // namespace chromeos
// Copyright 2014 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 // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef UI_BASE_IME_CANDIDATE_WINDOW_H_ #ifndef CHROMEOS_IME_CANDIDATE_WINDOW_H_
#define UI_BASE_IME_CANDIDATE_WINDOW_H_ #define CHROMEOS_IME_CANDIDATE_WINDOW_H_
#include <string> #include <string>
#include <vector> #include <vector>
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "ui/base/ui_base_export.h" #include "chromeos/chromeos_export.h"
namespace ui { namespace chromeos {
namespace input_method {
// CandidateWindow represents the structure of candidates generated from IME. // CandidateWindow represents the structure of candidates generated from IME.
class UI_BASE_EXPORT CandidateWindow { class CHROMEOS_EXPORT CandidateWindow {
public: public:
enum Orientation { enum Orientation {
HORIZONTAL = 0, HORIZONTAL = 0,
VERTICAL = 1, VERTICAL = 1,
}; };
struct UI_BASE_EXPORT CandidateWindowProperty { struct CandidateWindowProperty {
CandidateWindowProperty(); CandidateWindowProperty();
virtual ~CandidateWindowProperty(); virtual ~CandidateWindowProperty();
int page_size; int page_size;
...@@ -37,7 +38,7 @@ class UI_BASE_EXPORT CandidateWindow { ...@@ -37,7 +38,7 @@ class UI_BASE_EXPORT CandidateWindow {
}; };
// Represents a candidate entry. // Represents a candidate entry.
struct UI_BASE_EXPORT Entry { struct Entry {
Entry(); Entry();
virtual ~Entry(); virtual ~Entry();
std::string value; std::string value;
...@@ -120,6 +121,7 @@ class UI_BASE_EXPORT CandidateWindow { ...@@ -120,6 +121,7 @@ class UI_BASE_EXPORT CandidateWindow {
DISALLOW_COPY_AND_ASSIGN(CandidateWindow); DISALLOW_COPY_AND_ASSIGN(CandidateWindow);
}; };
} // namespace ui } // namespace input_method
} // namespace chromeos
#endif // UI_BASE_IME_CANDIDATE_WINDOW_H_ #endif // CHROMEOS_IME_CANDIDATE_WINDOW_H_
// Copyright 2014 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 // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// TODO(nona): Add more tests. // TODO(nona): Add more tests.
#include "ui/base/ime/candidate_window.h" #include "chromeos/ime/candidate_window.h"
#include <string> #include <string>
...@@ -12,7 +12,8 @@ ...@@ -12,7 +12,8 @@
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
namespace ui { namespace chromeos {
namespace input_method {
TEST(CandidateWindow, IsEqualTest) { TEST(CandidateWindow, IsEqualTest) {
CandidateWindow cw1; CandidateWindow cw1;
...@@ -135,4 +136,5 @@ TEST(CandidateWindow, CopyFromTest) { ...@@ -135,4 +136,5 @@ TEST(CandidateWindow, CopyFromTest) {
EXPECT_TRUE(cw1.IsEqual(cw2)); EXPECT_TRUE(cw1.IsEqual(cw2));
} }
} // namespace ui } // namespace input_method
} // namespace chromeos
...@@ -18,11 +18,13 @@ class Rect; ...@@ -18,11 +18,13 @@ class Rect;
} // namespace gfx } // namespace gfx
namespace ui { namespace ui {
class CandidateWindow;
class KeyEvent; class KeyEvent;
} // namespace ui } // namespace ui
namespace chromeos { namespace chromeos {
namespace input_method {
class CandidateWindow;
} // namespace input_method
class IBusText; class IBusText;
...@@ -109,8 +111,9 @@ class UI_BASE_EXPORT IBusPanelCandidateWindowHandlerInterface { ...@@ -109,8 +111,9 @@ class UI_BASE_EXPORT IBusPanelCandidateWindowHandlerInterface {
virtual ~IBusPanelCandidateWindowHandlerInterface() {} virtual ~IBusPanelCandidateWindowHandlerInterface() {}
// Called when the IME updates the lookup table. // Called when the IME updates the lookup table.
virtual void UpdateLookupTable(const ui::CandidateWindow& candidate_window, virtual void UpdateLookupTable(
bool visible) = 0; const input_method::CandidateWindow& candidate_window,
bool visible) = 0;
// Called when the IME updates the preedit text. The |text| is given in // Called when the IME updates the preedit text. The |text| is given in
// UTF-8 encoding. // UTF-8 encoding.
......
...@@ -16,7 +16,7 @@ MockIMECandidateWindowHandler::~MockIMECandidateWindowHandler() { ...@@ -16,7 +16,7 @@ MockIMECandidateWindowHandler::~MockIMECandidateWindowHandler() {
} }
void MockIMECandidateWindowHandler::UpdateLookupTable( void MockIMECandidateWindowHandler::UpdateLookupTable(
const ui::CandidateWindow& table, const input_method::CandidateWindow& table,
bool visible) { bool visible) {
++update_lookup_table_call_count_; ++update_lookup_table_call_count_;
last_update_lookup_table_arg_.lookup_table.CopyFrom(table); last_update_lookup_table_arg_.lookup_table.CopyFrom(table);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#ifndef UI_BASE_IME_CHROMEOS_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_ #define UI_BASE_IME_CHROMEOS_MOCK_IME_CANDIDATE_WINDOW_HANDLER_H_
#include "ui/base/ime/candidate_window.h" #include "chromeos/ime/candidate_window.h"
#include "ui/base/ime/chromeos/ibus_bridge.h" #include "ui/base/ime/chromeos/ibus_bridge.h"
#include "ui/base/ui_base_export.h" #include "ui/base/ui_base_export.h"
...@@ -15,7 +15,7 @@ class UI_BASE_EXPORT MockIMECandidateWindowHandler ...@@ -15,7 +15,7 @@ class UI_BASE_EXPORT MockIMECandidateWindowHandler
: public IBusPanelCandidateWindowHandlerInterface { : public IBusPanelCandidateWindowHandlerInterface {
public: public:
struct UpdateLookupTableArg { struct UpdateLookupTableArg {
ui::CandidateWindow lookup_table; input_method::CandidateWindow lookup_table;
bool is_visible; bool is_visible;
}; };
...@@ -29,7 +29,7 @@ class UI_BASE_EXPORT MockIMECandidateWindowHandler ...@@ -29,7 +29,7 @@ class UI_BASE_EXPORT MockIMECandidateWindowHandler
// IBusPanelCandidateWindowHandlerInterface override. // IBusPanelCandidateWindowHandlerInterface override.
virtual void UpdateLookupTable( virtual void UpdateLookupTable(
const ui::CandidateWindow& candidate_window, const input_method::CandidateWindow& candidate_window,
bool visible) OVERRIDE; bool visible) OVERRIDE;
virtual void UpdatePreeditText(const std::string& text, uint32 cursor_pos, virtual void UpdatePreeditText(const std::string& text, uint32 cursor_pos,
bool visible) OVERRIDE; bool visible) OVERRIDE;
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
'<(DEPTH)/ui/events/events.gyp:events', '<(DEPTH)/ui/events/events.gyp:events',
], ],
'sources': [ 'sources': [
'candidate_window.cc',
'candidate_window.h',
'chromeos/character_composer.cc', 'chromeos/character_composer.cc',
'chromeos/character_composer.h', 'chromeos/character_composer.h',
'chromeos/ibus_bridge.cc', 'chromeos/ibus_bridge.cc',
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
{ {
'sources': [ 'sources': [
'candidate_window_unittest.cc',
'chromeos/character_composer_unittest.cc', 'chromeos/character_composer_unittest.cc',
'composition_text_util_pango_unittest.cc', 'composition_text_util_pango_unittest.cc',
'input_method_base_unittest.cc', 'input_method_base_unittest.cc',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment