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

Side by Side Diff: ppapi/cpp/dev/widget_client_dev.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, 10 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/dev/widget_client_dev.h ('k') | ppapi/cpp/dev/zoom_dev.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) 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/widget_client_dev.h" 5 #include "ppapi/cpp/dev/widget_client_dev.h"
6 6
7 #include "ppapi/c/dev/ppp_scrollbar_dev.h" 7 #include "ppapi/c/dev/ppp_scrollbar_dev.h"
8 #include "ppapi/c/dev/ppp_widget_dev.h" 8 #include "ppapi/c/dev/ppp_widget_dev.h"
9 #include "ppapi/cpp/dev/scrollbar_dev.h" 9 #include "ppapi/cpp/dev/scrollbar_dev.h"
10 #include "ppapi/cpp/dev/widget_dev.h" 10 #include "ppapi/cpp/dev/widget_dev.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 Scrollbar_Dev(scrollbar_id), PP_ToBool(overlay)); 62 Scrollbar_Dev(scrollbar_id), PP_ToBool(overlay));
63 } 63 }
64 64
65 static PPP_Scrollbar_Dev scrollbar_interface = { 65 static PPP_Scrollbar_Dev scrollbar_interface = {
66 &Scrollbar_ValueChanged, 66 &Scrollbar_ValueChanged,
67 &Scrollbar_OverlayChanged, 67 &Scrollbar_OverlayChanged,
68 }; 68 };
69 69
70 } // namespace 70 } // namespace
71 71
72 WidgetClient_Dev::WidgetClient_Dev(const InstanceHandle& instance) 72 WidgetClient_Dev::WidgetClient_Dev(Instance* instance)
73 : associated_instance_(instance) { 73 : associated_instance_(instance) {
74 Module::Get()->AddPluginInterface(kPPPWidgetInterface, &widget_interface); 74 Module::Get()->AddPluginInterface(kPPPWidgetInterface, &widget_interface);
75 Instance::AddPerInstanceObject(instance, kPPPWidgetInterface, this); 75 instance->AddPerInstanceObject(kPPPWidgetInterface, this);
76 Module::Get()->AddPluginInterface(kPPPScrollbarInterface, 76 Module::Get()->AddPluginInterface(kPPPScrollbarInterface,
77 &scrollbar_interface); 77 &scrollbar_interface);
78 Instance::AddPerInstanceObject(instance, kPPPScrollbarInterface, this); 78 instance->AddPerInstanceObject(kPPPScrollbarInterface, this);
79 } 79 }
80 80
81 WidgetClient_Dev::~WidgetClient_Dev() { 81 WidgetClient_Dev::~WidgetClient_Dev() {
82 Instance::RemovePerInstanceObject(associated_instance_, 82 Instance::RemovePerInstanceObject(associated_instance_,
83 kPPPScrollbarInterface, this); 83 kPPPScrollbarInterface, this);
84 Instance::RemovePerInstanceObject(associated_instance_, 84 Instance::RemovePerInstanceObject(associated_instance_,
85 kPPPWidgetInterface, this); 85 kPPPWidgetInterface, this);
86 } 86 }
87 87
88 } // namespace pp 88 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/widget_client_dev.h ('k') | ppapi/cpp/dev/zoom_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698