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

Unified Diff: ppapi/proxy/ppb_var_proxy.cc

Issue 8826011: Remove PP_Module from parameters for PPB_Var.VarFromUtf8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/proxy/ppb_var_proxy.h ('k') | ppapi/proxy/ppb_var_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_var_proxy.cc
diff --git a/ppapi/proxy/ppb_var_proxy.cc b/ppapi/proxy/ppb_var_proxy.cc
deleted file mode 100644
index 4301234f6e442c9b9cf550f6237318280f427054..0000000000000000000000000000000000000000
--- a/ppapi/proxy/ppb_var_proxy.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ppapi/proxy/ppb_var_proxy.h"
-
-#include "ppapi/c/pp_var.h"
-#include "ppapi/c/ppb_var.h"
-#include "ppapi/shared_impl/ppapi_globals.h"
-#include "ppapi/shared_impl/proxy_lock.h"
-#include "ppapi/shared_impl/var.h"
-#include "ppapi/shared_impl/var_tracker.h"
-
-namespace ppapi {
-namespace proxy {
-
-namespace {
-
-// PPP_Var plugin --------------------------------------------------------------
-
-void AddRefVar(PP_Var var) {
- ppapi::ProxyAutoLock lock;
- PpapiGlobals::Get()->GetVarTracker()->AddRefVar(var);
-}
-
-void ReleaseVar(PP_Var var) {
- ppapi::ProxyAutoLock lock;
- PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(var);
-}
-
-PP_Var VarFromUtf8(PP_Module module, const char* data, uint32_t len) {
- ppapi::ProxyAutoLock lock;
- return StringVar::StringToPPVar(module, data, len);
-}
-
-const char* VarToUtf8(PP_Var var, uint32_t* len) {
- ppapi::ProxyAutoLock lock;
- StringVar* str = StringVar::FromPPVar(var);
- if (str) {
- *len = static_cast<uint32_t>(str->value().size());
- return str->value().c_str();
- }
- *len = 0;
- return NULL;
-}
-
-const PPB_Var var_interface = {
- &AddRefVar,
- &ReleaseVar,
- &VarFromUtf8,
- &VarToUtf8
-};
-
-} // namespace
-
-const PPB_Var* GetPPB_Var_Interface() {
- return &var_interface;
-}
-
-} // namespace proxy
-} // namespace ppapi
« no previous file with comments | « ppapi/proxy/ppb_var_proxy.h ('k') | ppapi/proxy/ppb_var_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698