diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-08 21:36:23 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-08 21:36:23 +0000 |
commit | 5f2cb1c97b9ea8af6fbb3dae290da52597e806e4 (patch) | |
tree | 4eff2c5b59293a1d434e2624a39643629a06ac47 /ppapi/cpp | |
parent | 3c217ae1a9677660cacb51a21d88020f5bbb6047 (diff) | |
download | chromium_src-5f2cb1c97b9ea8af6fbb3dae290da52597e806e4.zip chromium_src-5f2cb1c97b9ea8af6fbb3dae290da52597e806e4.tar.gz chromium_src-5f2cb1c97b9ea8af6fbb3dae290da52597e806e4.tar.bz2 |
Reupload of http://codereview.chromium.org/6801053/
My repo got messed up.
BUG=None
TEST=src/ppapi/tests/test_post_message.cc
Review URL: http://codereview.chromium.org/6801053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80992 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp')
-rw-r--r-- | ppapi/cpp/instance.cc | 12 | ||||
-rw-r--r-- | ppapi/cpp/module.cc | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/ppapi/cpp/instance.cc b/ppapi/cpp/instance.cc index 7717ad3..12cfc02 100644 --- a/ppapi/cpp/instance.cc +++ b/ppapi/cpp/instance.cc @@ -4,9 +4,9 @@ #include "ppapi/cpp/instance.h" -#include "ppapi/c/dev/ppb_messaging_dev.h" #include "ppapi/c/dev/ppp_printing_dev.h" #include "ppapi/c/ppb_instance.h" +#include "ppapi/c/ppb_messaging.h" #include "ppapi/cpp/common.h" #include "ppapi/cpp/dev/surface_3d_dev.h" #include "ppapi/cpp/graphics_2d.h" @@ -26,8 +26,8 @@ template <> const char* interface_name<PPB_Instance>() { return PPB_INSTANCE_INTERFACE; } -template <> const char* interface_name<PPB_Messaging_Dev>() { - return PPB_MESSAGING_DEV_INTERFACE; +template <> const char* interface_name<PPB_Messaging>() { + return PPB_MESSAGING_INTERFACE; } } // namespace @@ -125,10 +125,10 @@ Var Instance::ExecuteScript(const Var& script, Var* exception) { } void Instance::PostMessage(const Var& message) { - if (!has_interface<PPB_Messaging_Dev>()) + if (!has_interface<PPB_Messaging>()) return; - get_interface<PPB_Messaging_Dev>()->PostMessage(pp_instance(), - message.pp_var()); + get_interface<PPB_Messaging>()->PostMessage(pp_instance(), + message.pp_var()); } void Instance::AddPerInstanceObject(const std::string& interface_name, diff --git a/ppapi/cpp/module.cc b/ppapi/cpp/module.cc index f64041d..3883a5c2 100644 --- a/ppapi/cpp/module.cc +++ b/ppapi/cpp/module.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// 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. @@ -25,10 +25,10 @@ #include <string.h> -#include "ppapi/c/dev/ppp_messaging_dev.h" #include "ppapi/c/pp_instance.h" #include "ppapi/c/pp_var.h" #include "ppapi/c/ppp_instance.h" +#include "ppapi/c/ppp_messaging.h" #include "ppapi/cpp/common.h" #include "ppapi/cpp/url_loader.h" #include "ppapi/cpp/instance.h" @@ -145,7 +145,7 @@ void Messaging_HandleMessage(PP_Instance pp_instance, PP_Var var) { instance->HandleMessage(Var(Var::PassRef(), var)); } -static PPP_Messaging_Dev instance_messaging_interface = { +static PPP_Messaging instance_messaging_interface = { &Messaging_HandleMessage }; @@ -167,7 +167,7 @@ const void* Module::GetPluginInterface(const char* interface_name) { if (strcmp(interface_name, PPP_INSTANCE_INTERFACE) == 0) return &instance_interface; - if (strcmp(interface_name, PPP_MESSAGING_DEV_INTERFACE) == 0) + if (strcmp(interface_name, PPP_MESSAGING_INTERFACE) == 0) return &instance_messaging_interface; // Now see if anything was dynamically registered. |