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

Side by Side Diff: ppapi/cpp/dev/selection_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/selection_dev.h ('k') | ppapi/cpp/dev/video_capture_client_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/selection_dev.h" 5 #include "ppapi/cpp/dev/selection_dev.h"
6 6
7 #include "ppapi/cpp/instance.h" 7 #include "ppapi/cpp/instance.h"
8 #include "ppapi/cpp/instance_handle.h" 8 #include "ppapi/cpp/instance_handle.h"
9 #include "ppapi/cpp/module.h" 9 #include "ppapi/cpp/module.h"
10 #include "ppapi/cpp/var.h" 10 #include "ppapi/cpp/var.h"
(...skipping 12 matching lines...) Expand all
23 return static_cast<Selection_Dev*>(object)-> 23 return static_cast<Selection_Dev*>(object)->
24 GetSelectedText(PP_ToBool(html)).Detach(); 24 GetSelectedText(PP_ToBool(html)).Detach();
25 } 25 }
26 26
27 const PPP_Selection_Dev ppp_selection = { 27 const PPP_Selection_Dev ppp_selection = {
28 &GetSelectedText 28 &GetSelectedText
29 }; 29 };
30 30
31 } // namespace 31 } // namespace
32 32
33 Selection_Dev::Selection_Dev(const InstanceHandle& instance) 33 Selection_Dev::Selection_Dev(Instance* instance)
34 : associated_instance_(instance) { 34 : associated_instance_(instance) {
35 Module::Get()->AddPluginInterface(kPPPSelectionInterface, &ppp_selection); 35 Module::Get()->AddPluginInterface(kPPPSelectionInterface, &ppp_selection);
36 Instance::AddPerInstanceObject(instance, kPPPSelectionInterface, this); 36 instance->AddPerInstanceObject(kPPPSelectionInterface, this);
37 } 37 }
38 38
39 Selection_Dev::~Selection_Dev() { 39 Selection_Dev::~Selection_Dev() {
40 Instance::RemovePerInstanceObject(associated_instance_, 40 Instance::RemovePerInstanceObject(associated_instance_,
41 kPPPSelectionInterface, this); 41 kPPPSelectionInterface, this);
42 } 42 }
43 43
44 } // namespace pp 44 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/selection_dev.h ('k') | ppapi/cpp/dev/video_capture_client_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698