OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "mojo/common/binding_set.h" |
| 7 #include "mojo/public/cpp/application/application_delegate.h" |
| 8 #include "mojo/public/cpp/application/service_provider_impl.h" |
| 9 #include "mojo/services/icu_data/interfaces/icu_data.mojom.h" |
| 10 |
| 11 namespace icu_data { |
| 12 |
| 13 class ICUDataImpl : public mojo::ApplicationDelegate, public ICUData { |
| 14 public: |
| 15 ICUDataImpl(); |
| 16 ~ICUDataImpl() override; |
| 17 |
| 18 // mojo::ApplicationDelegate implementation. |
| 19 bool ConfigureIncomingConnection( |
| 20 mojo::ServiceProviderImpl* service_provider_impl) override; |
| 21 |
| 22 void Map(const mojo::String& sha1hash, |
| 23 const mojo::Callback<void(mojo::ScopedSharedBufferHandle)>& callback) |
| 24 override; |
| 25 |
| 26 private: |
| 27 void EnsureBuffer(); |
| 28 |
| 29 scoped_ptr<mojo::SharedBuffer> buffer_; |
| 30 mojo::BindingSet<ICUData> bindings_; |
| 31 }; |
| 32 |
| 33 } // namespace icu_data; |
OLD | NEW |