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

Side by Side Diff: ppapi/proxy/ppb_var_deprecated_proxy.cc

Issue 7655002: Convert the pp::proxy namespace to the ppapi::proxy namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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) 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/proxy/ppb_var_deprecated_proxy.h" 5 #include "ppapi/proxy/ppb_var_deprecated_proxy.h"
6 6
7 #include <stdlib.h> // For malloc 7 #include <stdlib.h> // For malloc
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/task.h" 11 #include "base/task.h"
12 #include "ppapi/c/dev/ppb_var_deprecated.h" 12 #include "ppapi/c/dev/ppb_var_deprecated.h"
13 #include "ppapi/c/pp_var.h" 13 #include "ppapi/c/pp_var.h"
14 #include "ppapi/c/ppb_core.h" 14 #include "ppapi/c/ppb_core.h"
15 #include "ppapi/proxy/host_dispatcher.h" 15 #include "ppapi/proxy/host_dispatcher.h"
16 #include "ppapi/proxy/plugin_dispatcher.h" 16 #include "ppapi/proxy/plugin_dispatcher.h"
17 #include "ppapi/proxy/plugin_resource_tracker.h" 17 #include "ppapi/proxy/plugin_resource_tracker.h"
18 #include "ppapi/proxy/plugin_var_tracker.h" 18 #include "ppapi/proxy/plugin_var_tracker.h"
19 #include "ppapi/proxy/ppapi_messages.h" 19 #include "ppapi/proxy/ppapi_messages.h"
20 #include "ppapi/proxy/ppp_class_proxy.h" 20 #include "ppapi/proxy/ppp_class_proxy.h"
21 #include "ppapi/proxy/serialized_var.h" 21 #include "ppapi/proxy/serialized_var.h"
22 #include "ppapi/shared_impl/var.h" 22 #include "ppapi/shared_impl/var.h"
23 23
24 using ppapi::StringVar; 24 namespace ppapi {
25
26 namespace pp {
27 namespace proxy { 25 namespace proxy {
28 26
29 namespace { 27 namespace {
30 28
31 // Used to do get the set-up information for calling a var object. If the 29 // Used to do get the set-up information for calling a var object. If the
32 // exception is set, returns NULL. Otherwise, computes the dispatcher for the 30 // exception is set, returns NULL. Otherwise, computes the dispatcher for the
33 // given var object. If the var is not a valid object, returns NULL and sets 31 // given var object. If the var is not a valid object, returns NULL and sets
34 // the exception. 32 // the exception.
35 PluginDispatcher* CheckExceptionAndGetDispatcher(const PP_Var& object, 33 PluginDispatcher* CheckExceptionAndGetDispatcher(const PP_Var& object,
36 PP_Var* exception) { 34 PP_Var* exception) {
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 SerializedVarReturnValue result) { 481 SerializedVarReturnValue result) {
484 SetAllowPluginReentrancy(); 482 SetAllowPluginReentrancy();
485 uint32_t arg_count = 0; 483 uint32_t arg_count = 0;
486 PP_Var* args = arg_vector.Get(dispatcher(), &arg_count); 484 PP_Var* args = arg_vector.Get(dispatcher(), &arg_count);
487 result.Return(dispatcher(), ppb_var_target()->Construct( 485 result.Return(dispatcher(), ppb_var_target()->Construct(
488 var.Get(dispatcher()), arg_count, args, 486 var.Get(dispatcher()), arg_count, args,
489 exception.OutParam(dispatcher()))); 487 exception.OutParam(dispatcher())));
490 } 488 }
491 489
492 void PPB_Var_Deprecated_Proxy::OnMsgIsInstanceOfDeprecated( 490 void PPB_Var_Deprecated_Proxy::OnMsgIsInstanceOfDeprecated(
493 pp::proxy::SerializedVarReceiveInput var, 491 SerializedVarReceiveInput var,
494 int64 ppp_class, 492 int64 ppp_class,
495 int64* ppp_class_data, 493 int64* ppp_class_data,
496 PP_Bool* result) { 494 PP_Bool* result) {
497 // TODO(brettw) write this. 495 // TODO(brettw) write this.
498 } 496 }
499 497
500 void PPB_Var_Deprecated_Proxy::OnMsgCreateObjectDeprecated( 498 void PPB_Var_Deprecated_Proxy::OnMsgCreateObjectDeprecated(
501 PP_Instance instance, 499 PP_Instance instance,
502 int64 ppp_class, 500 int64 ppp_class,
503 int64 class_data, 501 int64 class_data,
(...skipping 11 matching lines...) Expand all
515 } 513 }
516 514
517 void PPB_Var_Deprecated_Proxy::DoReleaseObject(int64 object_id) { 515 void PPB_Var_Deprecated_Proxy::DoReleaseObject(int64 object_id) {
518 PP_Var var; 516 PP_Var var;
519 var.type = PP_VARTYPE_OBJECT; 517 var.type = PP_VARTYPE_OBJECT;
520 var.value.as_id = object_id; 518 var.value.as_id = object_id;
521 ppb_var_target()->Release(var); 519 ppb_var_target()->Release(var);
522 } 520 }
523 521
524 } // namespace proxy 522 } // namespace proxy
525 } // namespace pp 523 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698