cast_content_utility_client.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. #ifndef CHROMECAST_UTILITY_CAST_CONTENT_UTILITY_CLIENT_H_
  5. #define CHROMECAST_UTILITY_CAST_CONTENT_UTILITY_CLIENT_H_
  6. #include <memory>
  7. #include <string>
  8. #include "content/public/utility/content_utility_client.h"
  9. #include "mojo/public/cpp/bindings/pending_receiver.h"
  10. #include "mojo/public/cpp/system/message_pipe.h"
  11. #include "services/service_manager/public/mojom/service.mojom.h"
  12. namespace chromecast {
  13. namespace shell {
  14. class CastContentUtilityClient : public content::ContentUtilityClient {
  15. public:
  16. static std::unique_ptr<CastContentUtilityClient> Create();
  17. CastContentUtilityClient();
  18. CastContentUtilityClient(const CastContentUtilityClient&) = delete;
  19. CastContentUtilityClient& operator=(const CastContentUtilityClient&) = delete;
  20. // cast::ContentUtilityClient:
  21. bool HandleServiceRequestDeprecated(
  22. const std::string& service_name,
  23. mojo::ScopedMessagePipeHandle service_pipe) override;
  24. virtual bool HandleServiceRequest(
  25. const std::string& service_name,
  26. mojo::PendingReceiver<service_manager::mojom::Service> receiver);
  27. };
  28. } // namespace shell
  29. } // namespace chromecast
  30. #endif // CHROMECAST_UTILITY_CAST_CONTENT_UTILITY_CLIENT_H_