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 "content/common/installedapp/installed_app_provider_impl.h" |
| 6 |
| 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "content/common/installedapp/related_application.mojom.h" |
| 9 #include "mojo/public/cpp/bindings/array.h" |
| 10 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 11 |
| 12 namespace content { |
| 13 |
| 14 namespace { |
| 15 |
| 16 class InstalledAppProviderEmptyImpl : public InstalledAppProvider { |
| 17 public: |
| 18 void FilterInstalledApps( |
| 19 mojo::Array<RelatedApplicationPtr> apps, |
| 20 const mojo::String& origin, |
| 21 const FilterInstalledAppsCallback& callback) override { |
| 22 callback.Run(mojo::Array<content::RelatedApplicationPtr>()); |
| 23 }; |
| 24 |
| 25 private: |
| 26 friend InstalledAppProviderImpl; |
| 27 |
| 28 InstalledAppProviderEmptyImpl( |
| 29 mojo::InterfaceRequest<InstalledAppProvider> request) |
| 30 : binding_(this, std::move(request)) {} |
| 31 ~InstalledAppProviderEmptyImpl() override {} |
| 32 |
| 33 // The binding between this object and the other end of the pipe. |
| 34 mojo::StrongBinding<InstalledAppProvider> binding_; |
| 35 }; |
| 36 |
| 37 } // namespace |
| 38 |
| 39 // static |
| 40 void InstalledAppProviderImpl::Create( |
| 41 mojo::InterfaceRequest<InstalledAppProvider> request) { |
| 42 new InstalledAppProviderEmptyImpl(std::move(request)); |
| 43 } |
| 44 } // namespace content |
OLD | NEW |