| Index: ppapi/cpp/module.cc
|
| ===================================================================
|
| --- ppapi/cpp/module.cc (revision 77426)
|
| +++ ppapi/cpp/module.cc (working copy)
|
| @@ -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.
|
|
|
| @@ -124,6 +124,16 @@
|
| return instance->GetInstanceObject().Detach();
|
| }
|
|
|
| +void Instance_HandleMessage(PP_Instance pp_instance, PP_Var var) {
|
| + Module* module_singleton = Module::Get();
|
| + if (!module_singleton)
|
| + return;
|
| + Instance* instance = module_singleton->InstanceForPPInstance(pp_instance);
|
| + if (!instance)
|
| + return;
|
| + instance->HandleMessage(Var(Var::PassRef(), var));
|
| +}
|
| +
|
| static PPP_Instance instance_interface = {
|
| &Instance_DidCreate,
|
| &Instance_DidDestroy,
|
| @@ -131,7 +141,8 @@
|
| &Instance_DidChangeFocus,
|
| &Instance_HandleInputEvent,
|
| &Instance_HandleDocumentLoad,
|
| - &Instance_GetInstanceObject
|
| + &Instance_GetInstanceObject,
|
| + &Instance_HandleMessage
|
| };
|
|
|
| // Module ----------------------------------------------------------------------
|
|
|