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

Side by Side Diff: content/renderer/pepper/message_channel.cc

Issue 18599005: [PPAPI] Added PP_VARTYPE_RESOURCE as a PP_VarType enum value. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix unittest_utils comparison of resource vars. Created 7 years, 3 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
« no previous file with comments | « no previous file | content/renderer/pepper/npapi_glue.cc » ('j') | ppapi/api/pp_var.idl » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/renderer/pepper/npapi_glue.cc » ('j') | ppapi/api/pp_var.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698