Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 7fffff2

Browse files
committed
Split input common code apart from JSON common code
1 parent a298f56 commit 7fffff2

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

shell/platform/common/cpp/BUILD.gn

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,28 @@ source_set("common_cpp_library_headers") {
3030
configs += [ ":desktop_library_implementation" ]
3131
}
3232

33+
source_set("common_cpp_input") {
34+
public = [
35+
"text_input_model.h",
36+
]
37+
38+
sources = [
39+
"text_input_model.cc",
40+
]
41+
42+
configs += [ ":desktop_library_implementation" ]
43+
44+
if (is_win) {
45+
# For wstring_conversion. See issue #50053.
46+
defines = [ "_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING" ]
47+
}
48+
}
49+
3350
source_set("common_cpp") {
3451
public = [
3552
"incoming_message_dispatcher.h",
3653
"json_message_codec.h",
3754
"json_method_codec.h",
38-
"text_input_model.h",
3955
]
4056

4157
# TODO: Refactor flutter_glfw.cc to move the implementations corresponding
@@ -44,7 +60,6 @@ source_set("common_cpp") {
4460
"incoming_message_dispatcher.cc",
4561
"json_message_codec.cc",
4662
"json_method_codec.cc",
47-
"text_input_model.cc",
4863
]
4964

5065
configs += [ ":desktop_library_implementation" ]
@@ -59,11 +74,6 @@ source_set("common_cpp") {
5974
":common_cpp_core",
6075
"//third_party/rapidjson",
6176
]
62-
63-
if (is_win) {
64-
# For wstring_conversion. See issue #50053.
65-
defines = [ "_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING" ]
66-
}
6777
}
6878

6979
# The portion of common_cpp that has no dependencies on the public/
@@ -117,6 +127,7 @@ executable("common_cpp_unittests") {
117127
deps = [
118128
":common_cpp",
119129
":common_cpp_fixtures",
130+
":common_cpp_input",
120131
"//flutter/shell/platform/common/cpp/client_wrapper:client_wrapper",
121132
"//flutter/shell/platform/common/cpp/client_wrapper:client_wrapper_library_stubs",
122133
"//flutter/testing",

shell/platform/glfw/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ source_set("flutter_glfw") {
5353
":flutter_glfw_headers",
5454
"//build/secondary/third_party/glfw",
5555
"//flutter/shell/platform/common/cpp:common_cpp",
56+
"//flutter/shell/platform/common/cpp:common_cpp_input",
5657
"//flutter/shell/platform/common/cpp/client_wrapper:client_wrapper",
5758
"//flutter/shell/platform/embedder:embedder_with_symbol_prefix",
5859
"//flutter/shell/platform/glfw/client_wrapper:client_wrapper_glfw",

shell/platform/windows/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ source_set("flutter_windows_source") {
7272
deps = [
7373
":flutter_windows_headers",
7474
"//flutter/shell/platform/common/cpp:common_cpp",
75+
"//flutter/shell/platform/common/cpp:common_cpp_input",
7576
"//flutter/shell/platform/common/cpp/client_wrapper:client_wrapper",
7677
"//flutter/shell/platform/embedder:embedder_with_symbol_prefix",
7778
"//flutter/shell/platform/windows/client_wrapper:client_wrapper_windows",

0 commit comments

Comments
 (0)