OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 27 matching lines...) Expand all Loading... |
38 #include <memory> | 38 #include <memory> |
39 #endif | 39 #endif |
40 | 40 |
41 namespace blink { | 41 namespace blink { |
42 | 42 |
43 class WebMessagePortChannelClient; | 43 class WebMessagePortChannelClient; |
44 class WebString; | 44 class WebString; |
45 | 45 |
46 typedef WebVector<class WebMessagePortChannel*> WebMessagePortChannelArray; | 46 typedef WebVector<class WebMessagePortChannel*> WebMessagePortChannelArray; |
47 | 47 |
48 // Provides an interface to a Message Port Channel implementation. The object ow
ns itself and | 48 // Provides an interface to a Message Port Channel implementation. The object |
49 // is signalled that its not needed anymore with the destroy() call. | 49 // owns itself and is signalled that its not needed anymore with the destroy() |
| 50 // call. |
50 class WebMessagePortChannel { | 51 class WebMessagePortChannel { |
51 public: | 52 public: |
52 virtual void setClient(WebMessagePortChannelClient*) = 0; | 53 virtual void setClient(WebMessagePortChannelClient*) = 0; |
53 virtual void destroy() = 0; | 54 virtual void destroy() = 0; |
54 // Callee receives ownership of the passed vector. | 55 // Callee receives ownership of the passed vector. |
55 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/351753 | 56 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/351753 |
56 virtual void postMessage(const WebString&, WebMessagePortChannelArray*) = 0; | 57 virtual void postMessage(const WebString&, WebMessagePortChannelArray*) = 0; |
57 virtual bool tryGetMessage(WebString*, WebMessagePortChannelArray&) = 0; | 58 virtual bool tryGetMessage(WebString*, WebMessagePortChannelArray&) = 0; |
58 | 59 |
59 protected: | 60 protected: |
(...skipping 10 matching lines...) Expand all Loading... |
70 }; | 71 }; |
71 | 72 |
72 using WebMessagePortChannelUniquePtr = | 73 using WebMessagePortChannelUniquePtr = |
73 std::unique_ptr<WebMessagePortChannel, WebMessagePortChannelDeleter>; | 74 std::unique_ptr<WebMessagePortChannel, WebMessagePortChannelDeleter>; |
74 | 75 |
75 #endif // INSIDE_BLINK | 76 #endif // INSIDE_BLINK |
76 | 77 |
77 } // namespace blink | 78 } // namespace blink |
78 | 79 |
79 #endif // WebMessagePortChannel_h | 80 #endif // WebMessagePortChannel_h |
OLD | NEW |