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

Side by Side Diff: ppapi/cpp/dev/buffer_dev.cc

Issue 7108051: Implement out-of-process proxy for PPB_Buffer_Dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "ppapi/cpp/dev/buffer_dev.h" 5 #include "ppapi/cpp/dev/buffer_dev.h"
6 6
7 #include "ppapi/c/dev/ppb_buffer_dev.h" 7 #include "ppapi/c/dev/ppb_buffer_dev.h"
8 #include "ppapi/cpp/instance.h" 8 #include "ppapi/cpp/instance.h"
9 #include "ppapi/cpp/module.h" 9 #include "ppapi/cpp/module.h"
10 #include "ppapi/cpp/module_impl.h" 10 #include "ppapi/cpp/module_impl.h"
(...skipping 23 matching lines...) Expand all
34 if (!has_interface<PPB_Buffer_Dev>()) 34 if (!has_interface<PPB_Buffer_Dev>())
35 return; 35 return;
36 36
37 PassRefFromConstructor(get_interface<PPB_Buffer_Dev>()->Create( 37 PassRefFromConstructor(get_interface<PPB_Buffer_Dev>()->Create(
38 instance->pp_instance(), size)); 38 instance->pp_instance(), size));
39 if (!get_interface<PPB_Buffer_Dev>()->Describe(pp_resource(), &size_) || 39 if (!get_interface<PPB_Buffer_Dev>()->Describe(pp_resource(), &size_) ||
40 !(data_ = get_interface<PPB_Buffer_Dev>()->Map(pp_resource()))) 40 !(data_ = get_interface<PPB_Buffer_Dev>()->Map(pp_resource())))
41 *this = Buffer_Dev(); 41 *this = Buffer_Dev();
42 } 42 }
43 43
44 Buffer_Dev::~Buffer_Dev() {
45 get_interface<PPB_Buffer_Dev>()->Unmap(pp_resource());
46 }
47
44 } // namespace pp 48 } // namespace pp
45
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698