Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(766)

Side by Side Diff: services/icu_data/icu_data_impl.h

Issue 2005103003: Add implementations of mojo::{Run,Terminate}[Main]Application() for "chromium". (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/macros.h"
5 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
6 #include "mojo/common/binding_set.h" 7 #include "mojo/common/binding_set.h"
7 #include "mojo/public/cpp/application/application_delegate.h" 8 #include "mojo/public/cpp/application/application_impl_base.h"
8 #include "mojo/public/cpp/application/service_provider_impl.h" 9 #include "mojo/public/cpp/application/service_provider_impl.h"
9 #include "mojo/services/icu_data/interfaces/icu_data.mojom.h" 10 #include "mojo/services/icu_data/interfaces/icu_data.mojom.h"
10 11
11 namespace icu_data { 12 namespace icu_data {
12 13
13 class ICUDataImpl : public mojo::ApplicationDelegate, public ICUData { 14 class ICUDataImpl : public mojo::ApplicationImplBase, public ICUData {
14 public: 15 public:
15 ICUDataImpl(); 16 ICUDataImpl();
16 ~ICUDataImpl() override; 17 ~ICUDataImpl() override;
17 18
18 // mojo::ApplicationDelegate implementation. 19 // mojo::ApplicationImplBase implementation.
19 bool ConfigureIncomingConnection( 20 bool OnAcceptConnection(
20 mojo::ServiceProviderImpl* service_provider_impl) override; 21 mojo::ServiceProviderImpl* service_provider_impl) override;
21 22
22 void Map(const mojo::String& sha1hash, 23 void Map(const mojo::String& sha1hash,
23 const mojo::Callback<void(mojo::ScopedSharedBufferHandle)>& callback) 24 const mojo::Callback<void(mojo::ScopedSharedBufferHandle)>& callback)
24 override; 25 override;
25 26
26 private: 27 private:
27 void EnsureBuffer(); 28 void EnsureBuffer();
28 29
29 scoped_ptr<mojo::SharedBuffer> buffer_; 30 scoped_ptr<mojo::SharedBuffer> buffer_;
30 mojo::BindingSet<ICUData> bindings_; 31 mojo::BindingSet<ICUData> bindings_;
32
33 DISALLOW_COPY_AND_ASSIGN(ICUDataImpl);
31 }; 34 };
32 35
33 } // namespace icu_data; 36 } // namespace icu_data;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698