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

Side by Side Diff: ppapi/native_client/src/trusted/plugin/callback_source.h

Issue 10536181: Declare virtual destructor in Nacl plugin CallbackSource to fix mac build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « no previous file | ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc » ('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) 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 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_CALLBACK_SOURCE_H 5 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_CALLBACK_SOURCE_H
6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_CALLBACK_SOURCE_H 6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_CALLBACK_SOURCE_H
7 7
8 #include "ppapi/cpp/completion_callback.h" 8 #include "ppapi/cpp/completion_callback.h"
9 9
10 namespace plugin { 10 namespace plugin {
11 11
12 // Classes that implement this interface can be used with FileDownloader's 12 // Classes that implement this interface can be used with FileDownloader's
13 // DOWNLOAD_STREAM mode. For each chunk of the file as it downloads, 13 // DOWNLOAD_STREAM mode. For each chunk of the file as it downloads,
14 // The FileDownloader will get a callback of type 14 // The FileDownloader will get a callback of type
15 // pp::CompletionCallbackWithOutput<std::vector<char>*> using the 15 // pp::CompletionCallbackWithOutput<std::vector<char>*> using the
16 // GetCallback function, and call it immediately, passing a pointer to a 16 // GetCallback function, and call it immediately, passing a pointer to a
17 // vector with the data as the output field. The class is templatized just 17 // vector with the data as the output field. The class is templatized just
18 // in case there are any other use cases in the future. 18 // in case there are any other use cases in the future.
19 // This class really only exists as a way to get callbacks 19 // This class really only exists as a way to get callbacks
20 // bound to an object (i.e. we don't need the asynchronous behavior of PPAPI) 20 // bound to an object (i.e. we don't need the asynchronous behavior of PPAPI)
21 // All we really need is tr1::function or base::bind or some such, but we don't 21 // All we really need is tr1::function or base::bind or some such, but we don't
22 // have those in the plugin. 22 // have those in the plugin.
23 23
24 template<class T> 24 template<class T>
25 class CallbackSource { 25 class CallbackSource {
26 public: 26 public:
27 virtual ~CallbackSource();
27 // Returns a callback from callback_factory's NewCallbackWithOutput, 28 // Returns a callback from callback_factory's NewCallbackWithOutput,
28 // bound to the implementing object. 29 // bound to the implementing object.
29 virtual pp::CompletionCallbackWithOutput<T> GetCallback() = 0; 30 virtual pp::CompletionCallbackWithOutput<T> GetCallback() = 0;
30 }; 31 };
31 } 32 }
32 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_CALLBACK_SOURCE_H 33 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_CALLBACK_SOURCE_H
OLDNEW
« no previous file with comments | « no previous file | ppapi/native_client/src/trusted/plugin/pnacl_coordinator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698