Commit 6e18cb2b authored by Yuly Novikov's avatar Yuly Novikov Committed by Commit Bot

Revert "[ozone/wayland] Refactor IME deps for ozone platform"

This reverts commit 40a87fcf.

Reason for revert: Breaks "compile" in Debug and "compile confirm no-op" in Release

Original change's description:
> [ozone/wayland] Refactor IME deps for ozone platform
> 
> Refactor base/ime components and dependencies for ozone
> plaform integration to avoid cyclic dependencies.
> 
> - Groups ui/base/ime common types into their own GN component
>   (ime_types) to break a dependency cycle that ozone ime context
>   integration would cause on ChromeOS.
> - Groups some of ui/base/ime/linux interfaces into their own GN
>   component (ime_linux) to break a dependency cycle that ozone
>   ime context integration would cause on ChromeOS.
> - Move chromeos source files under is_chromeos flag to avoid
>   depending them when chromeos is not used, but ime is needed
>   (kudos to msisov@igalia.com).
> 
> Bug: 791920
> Change-Id: I0b1668564dde22c6e2b05ee1323ebbe4a1343475
> Reviewed-on: https://chromium-review.googlesource.com/1193871
> Commit-Queue: Jani Hautakangas <jani.hautakangas@lge.com>
> Reviewed-by: Shu Chen <shuchen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#590072}

TBR=shuchen@chromium.org,yhanada@chromium.org,tonikitoo@igalia.com,msisov@igalia.com,jani.hautakangas@lge.com

Change-Id: I5b032277b66ff9d5f6daca34425c5464736db77e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 791920
Reviewed-on: https://chromium-review.googlesource.com/1217849Reviewed-by: default avatarYuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590119}
parent a9c4e1d4
...@@ -16,64 +16,51 @@ source_set("text_input_types") { ...@@ -16,64 +16,51 @@ source_set("text_input_types") {
] ]
} }
jumbo_component("ime_types") { jumbo_component("ime") {
output_name = "ui_base_ime_types" output_name = "ui_base_ime"
sources = [ sources = [
"candidate_window.cc", "candidate_window.cc",
"candidate_window.h", "candidate_window.h",
"chromeos/character_composer.cc",
"chromeos/character_composer.h",
"chromeos/component_extension_ime_manager.cc",
"chromeos/component_extension_ime_manager.h",
"chromeos/extension_ime_util.cc",
"chromeos/extension_ime_util.h",
"chromeos/fake_ime_keyboard.cc",
"chromeos/fake_ime_keyboard.h",
"chromeos/fake_input_method_delegate.cc",
"chromeos/fake_input_method_delegate.h",
"chromeos/ime_candidate_window_handler_interface.h",
"chromeos/ime_keyboard.cc",
"chromeos/ime_keyboard.h",
"chromeos/ime_keymap.cc",
"chromeos/ime_keymap.h",
"chromeos/input_method_delegate.h",
"chromeos/input_method_descriptor.cc",
"chromeos/input_method_descriptor.h",
"chromeos/input_method_manager.cc",
"chromeos/input_method_manager.h",
"chromeos/input_method_util.cc",
"chromeos/input_method_util.h",
"chromeos/mock_component_extension_ime_manager.cc",
"chromeos/mock_component_extension_ime_manager.h",
"chromeos/mock_component_extension_ime_manager_delegate.cc",
"chromeos/mock_component_extension_ime_manager_delegate.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",
"composition_text.cc", "composition_text.cc",
"composition_text.h", "composition_text.h",
"ime_text_span.cc",
"ime_text_span.h",
"infolist_entry.cc",
"infolist_entry.h",
"ui_base_ime_types_export.h",
]
defines = [ "UI_BASE_IME_TYPES_IMPLEMENTATION" ]
deps = [
"//base",
"//ui/gfx/range",
]
public_deps = [
":text_input_types",
"//skia",
]
}
jumbo_component("ime_linux") {
output_name = "ui_base_ime_linux"
sources = [
"linux/fake_input_method_context.cc",
"linux/fake_input_method_context.h",
"linux/fake_input_method_context_factory.cc",
"linux/fake_input_method_context_factory.h",
"linux/linux_input_method_context.h",
"linux/linux_input_method_context_factory.cc",
"linux/linux_input_method_context_factory.h",
"linux/ui_base_ime_linux_export.h",
]
defines = [ "UI_BASE_IME_LINUX_IMPLEMENTATION" ]
deps = [
"//base",
]
public_deps = [
":ime_types",
]
}
jumbo_component("ime") {
output_name = "ui_base_ime"
sources = [
"ime_bridge.cc", "ime_bridge.cc",
"ime_bridge.h", "ime_bridge.h",
"ime_engine_handler_interface.h", "ime_engine_handler_interface.h",
"ime_input_context_handler_interface.h", "ime_input_context_handler_interface.h",
"ime_text_span.cc",
"ime_text_span.h",
"infolist_entry.cc",
"infolist_entry.h",
"input_method.h", "input_method.h",
"input_method_base.cc", "input_method_base.cc",
"input_method_base.h", "input_method_base.h",
...@@ -93,6 +80,13 @@ jumbo_component("ime") { ...@@ -93,6 +80,13 @@ jumbo_component("ime") {
"input_method_minimal.cc", "input_method_minimal.cc",
"input_method_minimal.h", "input_method_minimal.h",
"input_method_observer.h", "input_method_observer.h",
"linux/fake_input_method_context.cc",
"linux/fake_input_method_context.h",
"linux/fake_input_method_context_factory.cc",
"linux/fake_input_method_context_factory.h",
"linux/linux_input_method_context.h",
"linux/linux_input_method_context_factory.cc",
"linux/linux_input_method_context_factory.h",
"mock_ime_input_context_handler.cc", "mock_ime_input_context_handler.cc",
"mock_ime_input_context_handler.h", "mock_ime_input_context_handler.h",
"mock_input_method.cc", "mock_input_method.cc",
...@@ -117,41 +111,6 @@ jumbo_component("ime") { ...@@ -117,41 +111,6 @@ jumbo_component("ime") {
"win/tsf_text_store.h", "win/tsf_text_store.h",
] ]
if (is_chromeos) {
sources += [
"chromeos/character_composer.cc",
"chromeos/character_composer.h",
"chromeos/component_extension_ime_manager.cc",
"chromeos/component_extension_ime_manager.h",
"chromeos/extension_ime_util.cc",
"chromeos/extension_ime_util.h",
"chromeos/fake_ime_keyboard.cc",
"chromeos/fake_ime_keyboard.h",
"chromeos/fake_input_method_delegate.cc",
"chromeos/fake_input_method_delegate.h",
"chromeos/ime_candidate_window_handler_interface.h",
"chromeos/ime_keyboard.cc",
"chromeos/ime_keyboard.h",
"chromeos/ime_keymap.cc",
"chromeos/ime_keymap.h",
"chromeos/input_method_delegate.h",
"chromeos/input_method_descriptor.cc",
"chromeos/input_method_descriptor.h",
"chromeos/input_method_manager.cc",
"chromeos/input_method_manager.h",
"chromeos/input_method_util.cc",
"chromeos/input_method_util.h",
"chromeos/mock_component_extension_ime_manager.cc",
"chromeos/mock_component_extension_ime_manager.h",
"chromeos/mock_component_extension_ime_manager_delegate.cc",
"chromeos/mock_component_extension_ime_manager_delegate.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",
]
}
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations. # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
...@@ -174,7 +133,8 @@ jumbo_component("ime") { ...@@ -174,7 +133,8 @@ jumbo_component("ime") {
] ]
public_deps = [ public_deps = [
":ime_types", ":text_input_types",
"//skia",
] ]
if (is_desktop_linux) { if (is_desktop_linux) {
...@@ -184,10 +144,6 @@ jumbo_component("ime") { ...@@ -184,10 +144,6 @@ jumbo_component("ime") {
] ]
} }
if (is_linux) {
public_deps += [ ":ime_linux" ]
}
if (!is_chromeos && is_linux) { if (!is_chromeos && is_linux) {
sources += [ sources += [
"linux/text_edit_command_auralinux.cc", "linux/text_edit_command_auralinux.cc",
......
...@@ -13,19 +13,19 @@ ...@@ -13,19 +13,19 @@
#include "base/macros.h" #include "base/macros.h"
#include "ui/base/ime/infolist_entry.h" #include "ui/base/ime/infolist_entry.h"
#include "ui/base/ime/ui_base_ime_types_export.h" #include "ui/base/ime/ui_base_ime_export.h"
namespace ui { namespace ui {
// CandidateWindow represents the structure of candidates generated from IME. // CandidateWindow represents the structure of candidates generated from IME.
class UI_BASE_IME_TYPES_EXPORT CandidateWindow { class UI_BASE_IME_EXPORT CandidateWindow {
public: public:
enum Orientation { enum Orientation {
HORIZONTAL = 0, HORIZONTAL = 0,
VERTICAL = 1, VERTICAL = 1,
}; };
struct UI_BASE_IME_TYPES_EXPORT CandidateWindowProperty { struct UI_BASE_IME_EXPORT CandidateWindowProperty {
CandidateWindowProperty(); CandidateWindowProperty();
virtual ~CandidateWindowProperty(); virtual ~CandidateWindowProperty();
int page_size; int page_size;
...@@ -41,7 +41,7 @@ class UI_BASE_IME_TYPES_EXPORT CandidateWindow { ...@@ -41,7 +41,7 @@ class UI_BASE_IME_TYPES_EXPORT CandidateWindow {
}; };
// Represents a candidate entry. // Represents a candidate entry.
struct UI_BASE_IME_TYPES_EXPORT Entry { struct UI_BASE_IME_EXPORT Entry {
Entry(); Entry();
Entry(const Entry& other); Entry(const Entry& other);
virtual ~Entry(); virtual ~Entry();
......
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "ui/base/ime/ime_text_span.h" #include "ui/base/ime/ime_text_span.h"
#include "ui/base/ime/ui_base_ime_types_export.h" #include "ui/base/ime/ui_base_ime_export.h"
#include "ui/gfx/range/range.h" #include "ui/gfx/range/range.h"
namespace ui { namespace ui {
// A struct represents the status of an ongoing composition text. // A struct represents the status of an ongoing composition text.
struct UI_BASE_IME_TYPES_EXPORT CompositionText { struct UI_BASE_IME_EXPORT CompositionText {
CompositionText(); CompositionText();
CompositionText(const CompositionText& other); CompositionText(const CompositionText& other);
~CompositionText(); ~CompositionText();
......
...@@ -11,14 +11,14 @@ ...@@ -11,14 +11,14 @@
#include <vector> #include <vector>
#include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkColor.h"
#include "ui/base/ime/ui_base_ime_types_export.h" #include "ui/base/ime/ui_base_ime_export.h"
namespace ui { namespace ui {
// Intentionally keep sync with blink::WebImeTextSpan defined in: // Intentionally keep sync with blink::WebImeTextSpan defined in:
// third_party/WebKit/public/web/WebImeTextSpan.h // third_party/WebKit/public/web/WebImeTextSpan.h
struct UI_BASE_IME_TYPES_EXPORT ImeTextSpan { struct UI_BASE_IME_EXPORT ImeTextSpan {
enum class Type { enum class Type {
// Creates a composition marker. // Creates a composition marker.
kComposition, kComposition,
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
#define UI_BASE_IME_INFOLIST_ENTRY_H_ #define UI_BASE_IME_INFOLIST_ENTRY_H_
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "ui/base/ime/ui_base_ime_types_export.h" #include "ui/base/ime/ui_base_ime_export.h"
namespace ui { namespace ui {
// The data model of infolist window. // The data model of infolist window.
struct UI_BASE_IME_TYPES_EXPORT InfolistEntry { struct UI_BASE_IME_EXPORT InfolistEntry {
base::string16 title; base::string16 title;
base::string16 body; base::string16 body;
bool highlighted; bool highlighted;
......
...@@ -12,8 +12,7 @@ namespace ui { ...@@ -12,8 +12,7 @@ namespace ui {
// An implementation of LinuxInputMethodContextFactory, which creates and // An implementation of LinuxInputMethodContextFactory, which creates and
// returns FakeInputMethodContext's. // returns FakeInputMethodContext's.
class UI_BASE_IME_LINUX_EXPORT FakeInputMethodContextFactory class FakeInputMethodContextFactory : public LinuxInputMethodContextFactory {
: public LinuxInputMethodContextFactory {
public: public:
FakeInputMethodContextFactory(); FakeInputMethodContextFactory();
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
#define UI_BASE_IME_LINUX_LINUX_INPUT_METHOD_CONTEXT_H_ #define UI_BASE_IME_LINUX_LINUX_INPUT_METHOD_CONTEXT_H_
#include "base/strings/string16.h" #include "base/strings/string16.h"
#include "ui/base/ime/linux/ui_base_ime_linux_export.h"
#include "ui/base/ime/text_input_type.h" #include "ui/base/ime/text_input_type.h"
#include "ui/base/ime/ui_base_ime_export.h"
namespace gfx { namespace gfx {
class Rect; class Rect;
...@@ -20,7 +20,7 @@ class KeyEvent; ...@@ -20,7 +20,7 @@ class KeyEvent;
// An interface of input method context for input method frameworks on // An interface of input method context for input method frameworks on
// GNU/Linux and likes. // GNU/Linux and likes.
class UI_BASE_IME_LINUX_EXPORT LinuxInputMethodContext { class UI_BASE_IME_EXPORT LinuxInputMethodContext {
public: public:
virtual ~LinuxInputMethodContext() {} virtual ~LinuxInputMethodContext() {}
...@@ -45,7 +45,7 @@ class UI_BASE_IME_LINUX_EXPORT LinuxInputMethodContext { ...@@ -45,7 +45,7 @@ class UI_BASE_IME_LINUX_EXPORT LinuxInputMethodContext {
}; };
// An interface of callback functions called from LinuxInputMethodContext. // An interface of callback functions called from LinuxInputMethodContext.
class UI_BASE_IME_LINUX_EXPORT LinuxInputMethodContextDelegate { class UI_BASE_IME_EXPORT LinuxInputMethodContextDelegate {
public: public:
virtual ~LinuxInputMethodContextDelegate() {} virtual ~LinuxInputMethodContextDelegate() {}
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <memory> #include <memory>
#include "ui/base/ime/linux/ui_base_ime_linux_export.h" #include "ui/base/ime/ui_base_ime_export.h"
namespace ui { namespace ui {
...@@ -17,7 +17,7 @@ class LinuxInputMethodContextDelegate; ...@@ -17,7 +17,7 @@ class LinuxInputMethodContextDelegate;
// An interface that lets different Linux platforms override the // An interface that lets different Linux platforms override the
// CreateInputMethodContext function declared here to return native input method // CreateInputMethodContext function declared here to return native input method
// contexts. // contexts.
class UI_BASE_IME_LINUX_EXPORT LinuxInputMethodContextFactory { class UI_BASE_IME_EXPORT LinuxInputMethodContextFactory {
public: public:
// Returns the current active factory or NULL. // Returns the current active factory or NULL.
static const LinuxInputMethodContextFactory* instance(); static const LinuxInputMethodContextFactory* instance();
......
// Copyright 2018 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.
#ifndef UI_BASE_IME_LINUX_UI_BASE_IME_LINUX_EXPORT_H_
#define UI_BASE_IME_LINUX_UI_BASE_IME_LINUX_EXPORT_H_
#if defined(COMPONENT_BUILD)
#if defined(WIN32)
#if defined(UI_BASE_IME_LINUX_IMPLEMENTATION)
#define UI_BASE_IME_LINUX_EXPORT __declspec(dllexport)
#else
#define UI_BASE_IME_LINUX_EXPORT __declspec(dllimport)
#endif
#else // !defined(WIN32)
#if defined(UI_BASE_IME_LINUX_IMPLEMENTATION)
#define UI_BASE_IME_LINUX_EXPORT __attribute__((visibility("default")))
#else
#define UI_BASE_IME_LINUX_EXPORT
#endif
#endif
#else // !defined(COMPONENT_BUILD)
#define UI_BASE_IME_LINUX_EXPORT
#endif
#endif // UI_BASE_IME_LINUX_UI_BASE_IME_LINUX_EXPORT_H_
// Copyright 2018 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.
#ifndef UI_BASE_IME_UI_BASE_IME_TYPES_EXPORT_H_
#define UI_BASE_IME_UI_BASE_IME_TYPES_EXPORT_H_
#if defined(COMPONENT_BUILD)
#if defined(WIN32)
#if defined(UI_BASE_IME_TYPES_IMPLEMENTATION)
#define UI_BASE_IME_TYPES_EXPORT __declspec(dllexport)
#else
#define UI_BASE_IME_TYPES_EXPORT __declspec(dllimport)
#endif
#else // !defined(WIN32)
#if defined(UI_BASE_IME_TYPES_IMPLEMENTATION)
#define UI_BASE_IME_TYPES_EXPORT __attribute__((visibility("default")))
#else
#define UI_BASE_IME_TYPES_EXPORT
#endif
#endif
#else // !defined(COMPONENT_BUILD)
#define UI_BASE_IME_TYPES_EXPORT
#endif
#endif // UI_BASE_IME_UI_BASE_IME_TYPES_EXPORT_H_
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