Ignore title parameter for navigator.registerProtocolHandler
[chromium-blink-merge.git] / mojo / public / cpp / bindings / no_interface.h
blob02682d4b00445ec35cf3355438a27a7fda1d414d
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.
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_
8 #include <assert.h>
10 #include "mojo/public/cpp/bindings/message.h"
11 #include "mojo/public/cpp/system/core.h"
13 namespace mojo {
15 // NoInterface is for use in cases when a non-existent or empty interface is
16 // needed (e.g., when the Mojom "Peer" attribute is not present).
18 class NoInterfaceProxy;
19 class NoInterfaceStub;
21 class NoInterface {
22 public:
23 typedef NoInterfaceProxy Proxy_;
24 typedef NoInterfaceStub Stub_;
25 typedef NoInterface Client_;
26 virtual ~NoInterface() {}
27 virtual void SetClient(NoInterface* client) {}
30 class NoInterfaceProxy : public NoInterface {
31 public:
32 explicit NoInterfaceProxy(MessageReceiver* receiver) {}
35 class NoInterfaceStub : public MessageReceiver {
36 public:
37 NoInterfaceStub() {}
38 void set_sink(NoInterface* sink) {}
39 virtual bool Accept(Message* message) MOJO_OVERRIDE;
40 virtual bool AcceptWithResponder(Message* message, MessageReceiver* responder)
41 MOJO_OVERRIDE;
45 // AnyInterface is for use in cases where any interface would do (e.g., see the
46 // Shell::Connect method).
48 typedef NoInterface AnyInterface;
50 } // namespace mojo
52 #endif // MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_