OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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 "components/installedapp/installed_app_provider_impl.h" |
| 6 |
| 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 9 |
| 10 namespace components { |
| 11 |
| 12 namespace { |
| 13 |
| 14 class InstalledAppProviderEmptyImpl : public InstalledAppProvider { |
| 15 public: |
| 16 void IsAppInstalled(const mojo::String& asset1, |
| 17 const mojo::String& asset2, |
| 18 const mojo::String& origin, |
| 19 const IsAppInstalledCallback& callback) override { |
| 20 callback.Run(false); |
| 21 }; |
| 22 |
| 23 void IsNativeAppInstalled( |
| 24 mojo::Map<mojo::String, mojo::Array<mojo::String>> verification, |
| 25 const mojo::String& origin, |
| 26 const IsNativeAppInstalledCallback& callback) { |
| 27 callback.Run(false); |
| 28 }; |
| 29 |
| 30 private: |
| 31 friend InstalledAppProviderImpl; |
| 32 |
| 33 InstalledAppProviderEmptyImpl( |
| 34 mojo::InterfaceRequest<InstalledAppProvider> request) |
| 35 : binding_(this, std::move(request)) {} |
| 36 ~InstalledAppProviderEmptyImpl() override {} |
| 37 |
| 38 // The binding between this object and the other end of the pipe. |
| 39 mojo::StrongBinding<InstalledAppProvider> binding_; |
| 40 }; |
| 41 |
| 42 } // namespace |
| 43 |
| 44 // static |
| 45 void InstalledAppProviderImpl::Create( |
| 46 mojo::InterfaceRequest<InstalledAppProvider> request) { |
| 47 new InstalledAppProviderEmptyImpl(std::move(request)); |
| 48 } |
| 49 } // namespace components |
OLD | NEW |