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

Side by Side Diff: content/renderer/pepper/v8_var_converter.h

Issue 290553004: PPAPI: Refactor MessageChannel to prep for sync postMessae (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move NaClHelper in to nacl namespace Created 6 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CONTENT_RENDERER_PEPPER_V8_VAR_CONVERTER_H 5 #ifndef CONTENT_RENDERER_PEPPER_V8_VAR_CONVERTER_H
6 #define CONTENT_RENDERER_PEPPER_V8_VAR_CONVERTER_H 6 #define CONTENT_RENDERER_PEPPER_V8_VAR_CONVERTER_H
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 28 matching lines...) Expand all
39 // graph in the result will have a refcount equal to the number of references 39 // graph in the result will have a refcount equal to the number of references
40 // to it in the graph. The root of the result will have one additional 40 // to it in the graph. The root of the result will have one additional
41 // reference. The callback is run when conversion is complete with the 41 // reference. The callback is run when conversion is complete with the
42 // resulting var and a bool indicating success or failure. Conversion is 42 // resulting var and a bool indicating success or failure. Conversion is
43 // asynchronous because converting some resources may result in communication 43 // asynchronous because converting some resources may result in communication
44 // across IPC. |context| is guaranteed to only be used synchronously. 44 // across IPC. |context| is guaranteed to only be used synchronously.
45 void FromV8Value( 45 void FromV8Value(
46 v8::Handle<v8::Value> val, 46 v8::Handle<v8::Value> val,
47 v8::Handle<v8::Context> context, 47 v8::Handle<v8::Context> context,
48 const base::Callback<void(const ppapi::ScopedPPVar&, bool)>& callback); 48 const base::Callback<void(const ppapi::ScopedPPVar&, bool)>& callback);
49 private:
50 // Returns true on success, false on failure.
51 bool FromV8ValueInternal(v8::Handle<v8::Value> val,
52 v8::Handle<v8::Context> context,
53 ppapi::ScopedPPVar* result_var);
49 54
50 private:
51 // The message loop to run the callback to |FromV8Value| from. 55 // The message loop to run the callback to |FromV8Value| from.
52 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; 56 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
53 57
54 // The converter to use for converting V8 vars to resources. 58 // The converter to use for converting V8 vars to resources.
55 scoped_ptr<ResourceConverter> resource_converter_; 59 scoped_ptr<ResourceConverter> resource_converter_;
56 60
57 DISALLOW_COPY_AND_ASSIGN(V8VarConverter); 61 DISALLOW_COPY_AND_ASSIGN(V8VarConverter);
58 }; 62 };
59 63
60 } // namespace content 64 } // namespace content
61 65
62 #endif // CONTENT_RENDERER_PEPPER_V8_VAR_CONVERTER_H 66 #endif // CONTENT_RENDERER_PEPPER_V8_VAR_CONVERTER_H
OLDNEW
« no previous file with comments | « content/renderer/pepper/resource_converter.cc ('k') | content/renderer/pepper/v8_var_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698