Commit 136a3105 authored by Findit's avatar Findit Committed by Shu Chen

Revert "Removes ui/platform_window/mojo as it is not used by anyone."

This reverts commit 6eb61402.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 662924 as the
culprit for failures in the build cycles as shown on:
https://analysis.chromium.org/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzZlYjYxNDAyYzFiMWI0MzAxNzYyYzZhYWFlYTI4YjI5MjFjYmY0YzIM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium/mac-archive-rel/136

Sample Failed Step: compile

Original change's description:
> Removes ui/platform_window/mojo as it is not used by anyone.
> 
> This is to remove the ref to some types under ui/base/ime/mojo, which will be removed later.
> 
> Bug: 965908
> Change-Id: I7979524066104c829b4f4e287a0ab87c9365f124
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1626055
> Reviewed-by: Dominick Ng <dominickn@chromium.org>
> Reviewed-by: Scott Violet <sky@chromium.org>
> Commit-Queue: Shu Chen <shuchen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#662924}


Change-Id: I529c9c9f28c32d2799af6a9c7d8a95d6606755ff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 965908
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1628221
Cr-Commit-Position: refs/heads/master@{#662945}
parent 2b34d3b9
......@@ -1408,6 +1408,7 @@ component("ash") {
"//ui/native_theme",
"//ui/ozone",
"//ui/platform_window",
"//ui/platform_window/mojo",
"//ui/platform_window/stub",
"//ui/snapshot",
"//ui/views/window/vector_icons",
......
......@@ -24,6 +24,7 @@
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/transform.h"
#include "ui/platform_window/mojo/ime_type_converters.h"
#include "ui/platform_window/platform_ime_controller.h"
#include "ui/platform_window/platform_window.h"
#include "ui/platform_window/platform_window_init_properties.h"
......
......@@ -31,6 +31,7 @@ mojom("mojom") {
"//ui/gfx/geometry/mojo",
"//ui/gfx/image/mojo:interfaces",
"//ui/gfx/mojo",
"//ui/platform_window/mojo:interfaces",
]
if (is_chromeos) {
......
......@@ -126,6 +126,7 @@ jumbo_component("aura") {
"//ui/gfx/geometry",
"//ui/gl",
"//ui/platform_window",
"//ui/platform_window/mojo",
"//ui/platform_window/stub",
]
......
# Copyright 2015 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.
import("//build/config/jumbo.gni")
import("//mojo/public/tools/bindings/mojom.gni")
# This target does NOT depend on skia. One can depend on this target to avoid
# picking up a dependency on skia.
jumbo_component("mojo") {
output_name = "mojo_ime_lib"
public_deps = [
"//ui/base/ime",
]
deps = [
":interfaces",
"//base",
"//ui/platform_window",
]
defines = [ "MOJO_IME_IMPLEMENTATION" ]
sources = [
"ime_type_converters.cc",
"ime_type_converters.h",
"mojo_ime_export.h",
]
}
mojom("interfaces") {
sources = [
"text_input_state.mojom",
]
public_deps = [
"//ui/base/ime/mojo",
]
}
include_rules = [
"+ui/base/ime/text_input_flags.h",
"+ui/base/ime/text_input_type.h",
"+ui/platform_window/text_input_state.h",
]
per-file *_type_converter*.*=set noparent
per-file *_type_converter*.*=file://ipc/SECURITY_OWNERS
per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS
// Copyright 2015 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 "ui/platform_window/mojo/ime_type_converters.h"
#include <stdint.h>
#include "base/macros.h"
namespace mojo {
#define TEXT_INPUT_TYPE_ASSERT(NAME) \
static_assert(static_cast<int32_t>(ui::mojom::TextInputType::NAME) == \
static_cast<int32_t>(ui::TEXT_INPUT_TYPE_##NAME), \
"TEXT_INPUT_TYPE must match")
TEXT_INPUT_TYPE_ASSERT(NONE);
TEXT_INPUT_TYPE_ASSERT(TEXT);
TEXT_INPUT_TYPE_ASSERT(PASSWORD);
TEXT_INPUT_TYPE_ASSERT(SEARCH);
TEXT_INPUT_TYPE_ASSERT(EMAIL);
TEXT_INPUT_TYPE_ASSERT(NUMBER);
TEXT_INPUT_TYPE_ASSERT(TELEPHONE);
TEXT_INPUT_TYPE_ASSERT(URL);
TEXT_INPUT_TYPE_ASSERT(DATE);
TEXT_INPUT_TYPE_ASSERT(DATE_TIME);
TEXT_INPUT_TYPE_ASSERT(DATE_TIME_LOCAL);
TEXT_INPUT_TYPE_ASSERT(MONTH);
TEXT_INPUT_TYPE_ASSERT(TIME);
TEXT_INPUT_TYPE_ASSERT(WEEK);
TEXT_INPUT_TYPE_ASSERT(TEXT_AREA);
TEXT_INPUT_TYPE_ASSERT(CONTENT_EDITABLE);
TEXT_INPUT_TYPE_ASSERT(DATE_TIME_FIELD);
TEXT_INPUT_TYPE_ASSERT(MAX);
#define TEXT_INPUT_FLAG_ASSERT(NAME) \
static_assert(static_cast<int32_t>(ui::mojom::TextInputFlag::NAME) == \
static_cast<int32_t>(ui::TEXT_INPUT_FLAG_##NAME), \
"TEXT_INPUT_FLAG must match")
TEXT_INPUT_FLAG_ASSERT(NONE);
TEXT_INPUT_FLAG_ASSERT(AUTOCOMPLETE_ON);
TEXT_INPUT_FLAG_ASSERT(AUTOCOMPLETE_OFF);
TEXT_INPUT_FLAG_ASSERT(AUTOCORRECT_ON);
TEXT_INPUT_FLAG_ASSERT(AUTOCORRECT_OFF);
TEXT_INPUT_FLAG_ASSERT(SPELLCHECK_ON);
TEXT_INPUT_FLAG_ASSERT(SPELLCHECK_OFF);
TEXT_INPUT_FLAG_ASSERT(AUTOCAPITALIZE_NONE);
TEXT_INPUT_FLAG_ASSERT(AUTOCAPITALIZE_CHARACTERS);
TEXT_INPUT_FLAG_ASSERT(AUTOCAPITALIZE_WORDS);
TEXT_INPUT_FLAG_ASSERT(AUTOCAPITALIZE_SENTENCES);
// static
ui::TextInputState
TypeConverter<ui::TextInputState, ui::mojom::TextInputStatePtr>::Convert(
const ui::mojom::TextInputStatePtr& input) {
return ui::TextInputState(
ConvertTo<ui::TextInputType>(input->type), input->flags,
input->text.has_value() ? input->text.value() : std::string(),
input->selection_start, input->selection_end, input->composition_start,
input->composition_end, input->can_compose_inline);
}
} // namespace mojo
// Copyright 2015 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_PLATFORM_WINDOW_MOJO_IME_TYPE_CONVERTERS_H_
#define UI_PLATFORM_WINDOW_MOJO_IME_TYPE_CONVERTERS_H_
#include "ui/base/ime/ime_text_span.h"
#include "ui/platform_window/mojo/mojo_ime_export.h"
#include "ui/platform_window/mojo/text_input_state.mojom.h"
#include "ui/platform_window/text_input_state.h"
namespace mojo {
template <>
struct MOJO_IME_EXPORT
TypeConverter<ui::TextInputState, ui::mojom::TextInputStatePtr> {
static ui::TextInputState Convert(const ui::mojom::TextInputStatePtr& input);
};
} // namespace mojo
#endif // UI_PLATFORM_WINDOW_MOJO_IME_TYPE_CONVERTERS_H_
// Copyright 2015 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_PLATFORM_WINDOW_MOJO_MOJO_IME_EXPORT_H_
#define UI_PLATFORM_WINDOW_MOJO_MOJO_IME_EXPORT_H_
#if defined(COMPONENT_BUILD)
#if defined(WIN32)
#if defined(MOJO_IME_IMPLEMENTATION)
#define MOJO_IME_EXPORT __declspec(dllexport)
#else
#define MOJO_IME_EXPORT __declspec(dllimport)
#endif
#else // !defined(WIN32)
#if defined(MOJO_IME_IMPLEMENTATION)
#define MOJO_IME_EXPORT __attribute__((visibility("default")))
#else
#define MOJO_IME_EXPORT
#endif
#endif // defined(WIN32)
#else // !defined(COMPONENT_BUILD)
#define MOJO_IME_EXPORT
#endif
#endif // UI_PLATFORM_WINDOW_MOJO_MOJO_IME_EXPORT_H_
// Copyright 2015 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.
module ui.mojom;
import "ui/base/ime/mojo/ime_types.mojom";
// Text input info which is based on blink::WebTextInputInfo.
struct TextInputState {
// The type of input field.
TextInputType type;
// The flags of the input field (autocorrect, autocomplete, etc.).
int32 flags;
// The value of the input field.
string? text;
// The cursor position of the current selection start, or the caret position
// if nothing is selected.
int32 selection_start;
// The cursor position of the current selection end, or the caret position
// if nothing is selected.
int32 selection_end;
// The start position of the current composition, or -1 if there is none.
int32 composition_start;
// The end position of the current composition, or -1 if there is none.
int32 composition_end;
// Whether or not inline composition can be performed for the current input.
bool can_compose_inline;
};
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