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

Side by Side Diff: ppapi/cpp/graphics_3d_client.cc

Issue 9481015: Make the PPP wrappers take an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH DESCRIPTION Created 8 years, 9 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
« no previous file with comments | « ppapi/cpp/graphics_3d_client.h ('k') | ppapi/cpp/instance.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/graphics_3d_client.h" 5 #include "ppapi/cpp/graphics_3d_client.h"
6 6
7 #include "ppapi/c/ppp_graphics_3d.h" 7 #include "ppapi/c/ppp_graphics_3d.h"
8 #include "ppapi/cpp/instance.h" 8 #include "ppapi/cpp/instance.h"
9 #include "ppapi/cpp/instance_handle.h" 9 #include "ppapi/cpp/instance_handle.h"
10 #include "ppapi/cpp/module.h" 10 #include "ppapi/cpp/module.h"
(...skipping 12 matching lines...) Expand all
23 return; 23 return;
24 return static_cast<Graphics3DClient*>(object)->Graphics3DContextLost(); 24 return static_cast<Graphics3DClient*>(object)->Graphics3DContextLost();
25 } 25 }
26 26
27 static PPP_Graphics3D graphics3d_interface = { 27 static PPP_Graphics3D graphics3d_interface = {
28 &Graphics3D_ContextLost, 28 &Graphics3D_ContextLost,
29 }; 29 };
30 30
31 } // namespace 31 } // namespace
32 32
33 Graphics3DClient::Graphics3DClient(const InstanceHandle& instance) 33 Graphics3DClient::Graphics3DClient(Instance* instance)
34 : associated_instance_(instance) { 34 : associated_instance_(instance) {
35 Module::Get()->AddPluginInterface(kPPPGraphics3DInterface, 35 Module::Get()->AddPluginInterface(kPPPGraphics3DInterface,
36 &graphics3d_interface); 36 &graphics3d_interface);
37 Instance::AddPerInstanceObject(instance, kPPPGraphics3DInterface, this); 37 instance->AddPerInstanceObject(kPPPGraphics3DInterface, this);
38 } 38 }
39 39
40 Graphics3DClient::~Graphics3DClient() { 40 Graphics3DClient::~Graphics3DClient() {
41 Instance::RemovePerInstanceObject(associated_instance_, 41 Instance::RemovePerInstanceObject(associated_instance_,
42 kPPPGraphics3DInterface, this); 42 kPPPGraphics3DInterface, this);
43 } 43 }
44 44
45 } // namespace pp 45 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/graphics_3d_client.h ('k') | ppapi/cpp/instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698