Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- File Name: /src/net/interfaces/corp_data_sharing.mojom
- module net.interfaces;
- interface CorpDataSharing {
- SendMessage();
- };
- ======================================================================================================================
- File Name: /src/net/interfaces/corp_data_sharing_impl.cc
- #include "net/interfaces/corp_data_sharing/corp_data_sharing.mojom.h"
- #include "mojo/public/cpp/bindings/binding.h"
- #include "mojo/public/cpp/bindings/interface_request.h"
- namespace net {
- namespace interfaces {
- class CorpDataSharingImpl : public mojom::CorpDataSharing {
- public:
- CorpDataSharingImpl(mojom::CorpDataSharingRequest request)
- : binding_(this, std::move(request)) {}
- ~CorpDataSharingImpl() override {}
- // mojom::Frobinator:
- void SendMessage() override { DLOG(INFO) << "I can't stop messaging!"; }
- private:
- mojo::Binding<mojom::SendMessage> binding_;
- };
- }
- }
- ======================================================================================================================
- File Name: /src/net/url_request/url_request_http_job.cc
- //List of Added Header Files
- #include "net/dns/corp_data_sharing_impl.cc"
- #include "mojo/public/cpp/bindings/binding.h"
- #include "mojo/public/cpp/bindings/interface_request.h"
- //List of Added Code
- interfaces::CorpDataSharingPtr corp_data_sharer;
- interfaces::CorpDataSharingImpl impl(MakeRequest(&corp_data_sharer));
- // Tada!
- corp_data_sharer->SendMessage();
- ======================================================================================================================
- Error Received:
- ../../net/url_request/url_request_http_job.cc:511:40: error: no matching function for call to 'MakeRequest'
- interfaces::CorpDataSharingImpl impl(MakeRequest(&corp_data_sharer));
- ^~~~~~~~~~~
- ../../mojo/public/cpp/bindings/interface_request.h:77:29: note: candidate template ignored: couldn't infer template argument 'Interface'
- InterfaceRequest<Interface> MakeRequest(ScopedMessagePipeHandle handle) {
- ^
- 1 error generated.
- ninja: build stopped: subcommand failed.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.


