OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/renderer/pepper/message_channel.h" | 5 #include "content/renderer/pepper/message_channel.h" |
6 | 6 |
7 #include <cstdlib> | 7 #include <cstdlib> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 ArrayBufferVar* new_buffer = ArrayBufferVar::FromPPVar(new_buffer_var); | 97 ArrayBufferVar* new_buffer = ArrayBufferVar::FromPPVar(new_buffer_var); |
98 DCHECK(new_buffer); | 98 DCHECK(new_buffer); |
99 if (!new_buffer) | 99 if (!new_buffer) |
100 return PP_MakeUndefined(); | 100 return PP_MakeUndefined(); |
101 memcpy(new_buffer->Map(), buffer->Map(), buffer->ByteLength()); | 101 memcpy(new_buffer->Map(), buffer->Map(), buffer->ByteLength()); |
102 return new_buffer_var; | 102 return new_buffer_var; |
103 } | 103 } |
104 case PP_VARTYPE_OBJECT: | 104 case PP_VARTYPE_OBJECT: |
105 case PP_VARTYPE_ARRAY: | 105 case PP_VARTYPE_ARRAY: |
106 case PP_VARTYPE_DICTIONARY: | 106 case PP_VARTYPE_DICTIONARY: |
107 // Objects/Arrays/Dictionaries not supported by PostMessage in-process. | 107 case PP_VARTYPE_RESOURCE: |
| 108 // These types are not supported by PostMessage in-process. |
108 NOTREACHED(); | 109 NOTREACHED(); |
109 return PP_MakeUndefined(); | 110 return PP_MakeUndefined(); |
110 } | 111 } |
111 NOTREACHED(); | 112 NOTREACHED(); |
112 return PP_MakeUndefined(); | 113 return PP_MakeUndefined(); |
113 } | 114 } |
114 | 115 |
115 //------------------------------------------------------------------------------ | 116 //------------------------------------------------------------------------------ |
116 // Implementations of NPClass functions. These are here to: | 117 // Implementations of NPClass functions. These are here to: |
117 // - Implement postMessage behavior. | 118 // - Implement postMessage behavior. |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 // incoming passthrough object first, so that we behave correctly if anyone | 552 // incoming passthrough object first, so that we behave correctly if anyone |
552 // invokes: | 553 // invokes: |
553 // SetPassthroughObject(passthrough_object()); | 554 // SetPassthroughObject(passthrough_object()); |
554 if (passthrough_object_) | 555 if (passthrough_object_) |
555 WebBindings::releaseObject(passthrough_object_); | 556 WebBindings::releaseObject(passthrough_object_); |
556 | 557 |
557 passthrough_object_ = passthrough; | 558 passthrough_object_ = passthrough; |
558 } | 559 } |
559 | 560 |
560 } // namespace content | 561 } // namespace content |
OLD | NEW |