Index: services/icu_data/icu_data_impl.h |
diff --git a/services/icu_data/icu_data_impl.h b/services/icu_data/icu_data_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6c81120559961749cb06ccf888e7b6972b082c5d |
--- /dev/null |
+++ b/services/icu_data/icu_data_impl.h |
@@ -0,0 +1,33 @@ |
+// Copyright 2016 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 "base/memory/scoped_ptr.h" |
+#include "mojo/common/binding_set.h" |
+#include "mojo/public/cpp/application/application_delegate.h" |
+#include "mojo/public/cpp/application/service_provider_impl.h" |
+#include "mojo/services/icu_data/interfaces/icu_data.mojom.h" |
+ |
+namespace icu_data { |
+ |
+class ICUDataImpl : public mojo::ApplicationDelegate, public ICUData { |
+ public: |
+ ICUDataImpl(); |
+ ~ICUDataImpl() override; |
+ |
+ // mojo::ApplicationDelegate implementation. |
+ bool ConfigureIncomingConnection( |
+ mojo::ServiceProviderImpl* service_provider_impl) override; |
+ |
+ void Map(const mojo::String& sha1hash, |
+ const mojo::Callback<void(mojo::ScopedSharedBufferHandle)>& callback) |
+ override; |
+ |
+ private: |
+ void EnsureBuffer(); |
+ |
+ scoped_ptr<mojo::SharedBuffer> buffer_; |
+ mojo::BindingSet<ICUData> bindings_; |
+}; |
+ |
+} // namespace icu_data; |