mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Support ICU on Android
This CL adds an icu_data application that vends ICU data to clients via shared memory. We use a sha1hash to validate the integrity of the data. Currently, this icu_data service is used on Android only. Desktop platforms load the ICU data table from the file system, as they did before. See the mojo-dev discussion for more background. R=jamesr@chromium.org Review URL: https://codereview.chromium.org/826093004
This commit is contained in:
parent
e631b585b6
commit
b1a957cac5
@ -37,7 +37,6 @@ mojo_native_application("viewer") {
|
||||
deps = [
|
||||
":bindings",
|
||||
":sky_modules",
|
||||
"//base:i18n",
|
||||
"//gin",
|
||||
"//mojo/application",
|
||||
"//mojo/common",
|
||||
@ -45,6 +44,7 @@ mojo_native_application("viewer") {
|
||||
"//mojo/converters/geometry",
|
||||
"//mojo/converters/surfaces",
|
||||
"//mojo/edk/js",
|
||||
"//mojo/icu",
|
||||
"//mojo/public/cpp/bindings",
|
||||
"//mojo/public/cpp/system",
|
||||
"//mojo/public/cpp/utility",
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#include "base/threading/thread.h"
|
||||
#include "mojo/application/application_runner_chromium.h"
|
||||
#include "mojo/common/tracing_impl.h"
|
||||
#include "mojo/icu/icu.h"
|
||||
#include "mojo/public/c/system/main.h"
|
||||
#include "mojo/public/cpp/application/application_connection.h"
|
||||
#include "mojo/public/cpp/application/application_delegate.h"
|
||||
@ -20,10 +21,6 @@
|
||||
#include "sky/viewer/document_view.h"
|
||||
#include "sky/viewer/platform/platform_impl.h"
|
||||
|
||||
#if !defined(COMPONENT_BUILD)
|
||||
#include "base/i18n/icu_util.h"
|
||||
#endif
|
||||
|
||||
namespace sky {
|
||||
|
||||
// Load the viewer in testing mode so we can dump pixels.
|
||||
@ -50,11 +47,7 @@ class Viewer : public mojo::ApplicationDelegate,
|
||||
platform_impl_.reset(new PlatformImpl(app));
|
||||
blink::initialize(platform_impl_.get());
|
||||
|
||||
// TODO(eseidel): Haven't solved ICU data loading for MojoShell.apk yet.
|
||||
#if !defined(OS_ANDROID)
|
||||
base::i18n::InitializeICU();
|
||||
#endif
|
||||
|
||||
mojo::icu::Initialize(app);
|
||||
mojo::TracingImpl::Create(app);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user