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

Side by Side Diff: mojo/public/tests/mojom/math_calculator.h

Issue 66353002: Mojo: RemotePtr<S> + bindings changes for Peer attribute. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + fix error in sample_service.h Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « mojo/public/tests/mojom/DEPS ('k') | mojo/public/tests/mojom/math_calculator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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 #ifndef MOJO_GENERATED_BINDINGS_MATH_CALCULATOR_MATH_CALCULATOR_H_
6 #define MOJO_GENERATED_BINDINGS_MATH_CALCULATOR_MATH_CALCULATOR_H_
7
8 #include "mojo/public/bindings/lib/bindings.h"
9 #include "mojo/public/bindings/lib/message.h"
10
11 namespace math {
12
13 #pragma pack(push, 1)
14
15
16 #pragma pack(pop)
17
18 class CalculatorProxy;
19 class CalculatorStub;
20 class CalculatorUI;
21
22 class Calculator {
23 public:
24 typedef CalculatorProxy _Proxy;
25 typedef CalculatorStub _Stub;
26 typedef CalculatorUI _Peer;
27 virtual void Clear() = 0;
28 virtual void Add(double value) = 0;
29 virtual void Multiply(double value) = 0;
30 };
31
32 class CalculatorUIProxy;
33 class CalculatorUIStub;
34 class Calculator;
35
36 class CalculatorUI {
37 public:
38 typedef CalculatorUIProxy _Proxy;
39 typedef CalculatorUIStub _Stub;
40 typedef Calculator _Peer;
41 virtual void Output(double value) = 0;
42 };
43
44 class CalculatorProxy : public Calculator {
45 public:
46 explicit CalculatorProxy(mojo::MessageReceiver* receiver);
47
48 virtual void Clear() MOJO_OVERRIDE;
49 virtual void Add(double value) MOJO_OVERRIDE;
50 virtual void Multiply(double value) MOJO_OVERRIDE;
51
52 private:
53 mojo::MessageReceiver* receiver_;
54 };
55
56 class CalculatorUIProxy : public CalculatorUI {
57 public:
58 explicit CalculatorUIProxy(mojo::MessageReceiver* receiver);
59
60 virtual void Output(double value) MOJO_OVERRIDE;
61
62 private:
63 mojo::MessageReceiver* receiver_;
64 };
65
66 class CalculatorStub : public Calculator, public mojo::MessageReceiver {
67 public:
68 virtual bool Accept(mojo::Message* message) MOJO_OVERRIDE;
69 };
70
71 class CalculatorUIStub : public CalculatorUI, public mojo::MessageReceiver {
72 public:
73 virtual bool Accept(mojo::Message* message) MOJO_OVERRIDE;
74 };
75
76
77 } // namespace math
78
79 #endif // MOJO_GENERATED_BINDINGS_MATH_CALCULATOR_MATH_CALCULATOR_H_
OLDNEW
« no previous file with comments | « mojo/public/tests/mojom/DEPS ('k') | mojo/public/tests/mojom/math_calculator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698