Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: third_party/mojo/src/mojo/public/cpp/bindings/no_interface.h

Issue 954643002: Update mojo sdk to rev 3d23dae011859a2aae49f1d1adde705c8e85d819 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: resolve more msvc linkage woes Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_ 5 #ifndef MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_
6 #define MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_ 6 #define MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_
7 7
8 #include "mojo/public/cpp/bindings/message.h" 8 #include "mojo/public/cpp/bindings/message.h"
9 #include "mojo/public/cpp/bindings/message_filter.h" 9 #include "mojo/public/cpp/bindings/message_filter.h"
10 #include "mojo/public/cpp/system/core.h" 10 #include "mojo/public/cpp/system/core.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 13
14 // NoInterface is for use in cases when a non-existent or empty interface is 14 // NoInterface is for use in cases when a non-existent or empty interface is
15 // needed (e.g., when the Mojom "Peer" attribute is not present). 15 // needed.
16 16
17 class NoInterfaceProxy; 17 class NoInterfaceProxy;
18 class NoInterfaceStub; 18 class NoInterfaceStub;
19 19
20 class NoInterface { 20 class NoInterface {
21 public: 21 public:
22 static const char* Name_; 22 static const char* Name_;
23 typedef NoInterfaceProxy Proxy_; 23 typedef NoInterfaceProxy Proxy_;
24 typedef NoInterfaceStub Stub_; 24 typedef NoInterfaceStub Stub_;
25 typedef PassThroughFilter RequestValidator_; 25 typedef PassThroughFilter RequestValidator_;
26 typedef PassThroughFilter ResponseValidator_; 26 typedef PassThroughFilter ResponseValidator_;
27 typedef NoInterface Client;
28 virtual ~NoInterface() {} 27 virtual ~NoInterface() {}
29 }; 28 };
30 29
31 class NoInterfaceProxy : public NoInterface { 30 class NoInterfaceProxy : public NoInterface {
32 public: 31 public:
33 explicit NoInterfaceProxy(MessageReceiver* receiver) {} 32 explicit NoInterfaceProxy(MessageReceiver* receiver) {}
34 }; 33 };
35 34
36 class NoInterfaceStub : public MessageReceiverWithResponder { 35 class NoInterfaceStub : public MessageReceiverWithResponder {
37 public: 36 public:
38 NoInterfaceStub() {} 37 NoInterfaceStub() {}
39 void set_sink(NoInterface* sink) {} 38 void set_sink(NoInterface* sink) {}
40 NoInterface* sink() { return nullptr; } 39 NoInterface* sink() { return nullptr; }
41 bool Accept(Message* message) override; 40 bool Accept(Message* message) override;
42 bool AcceptWithResponder(Message* message, 41 bool AcceptWithResponder(Message* message,
43 MessageReceiver* responder) override; 42 MessageReceiver* responder) override;
44 }; 43 };
45 44
46 // AnyInterface is for use in cases where any interface would do (e.g., see the 45 // AnyInterface is for use in cases where any interface would do (e.g., see the
47 // Shell::Connect method). 46 // Shell::Connect method).
48 47
49 typedef NoInterface AnyInterface; 48 typedef NoInterface AnyInterface;
50 49
51 } // namespace mojo 50 } // namespace mojo
52 51
53 #endif // MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_ 52 #endif // MOJO_PUBLIC_CPP_BINDINGS_NO_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698