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

Unified Diff: tests/fake_browser_ppapi/fake_instance.cc

Issue 7292002: Remove plugin connection to PPAPI scriptable objects (var deprecated). Also (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/fake_browser_ppapi/fake_instance.h ('k') | tests/fake_browser_ppapi/fake_nacl_private.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/fake_browser_ppapi/fake_instance.cc
===================================================================
--- tests/fake_browser_ppapi/fake_instance.cc (revision 6005)
+++ tests/fake_browser_ppapi/fake_instance.cc (working copy)
@@ -1,119 +0,0 @@
-// Copyright (c) 2011 The Native Client 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 <stdio.h>
-#include "native_client/tests/fake_browser_ppapi/fake_instance.h"
-
-#include "native_client/src/include/nacl_macros.h"
-#include "native_client/src/include/portability.h"
-#include "native_client/tests/fake_browser_ppapi/fake_window.h"
-#include "native_client/tests/fake_browser_ppapi/utility.h"
-#include "ppapi/c/ppb_instance.h"
-#include "ppapi/c/private/ppb_instance_private.h"
-
-using fake_browser_ppapi::DebugPrintf;
-
-namespace fake_browser_ppapi {
-
-namespace {
-
-static PP_Bool BindGraphics(PP_Instance instance, PP_Resource device) {
- return static_cast<PP_Bool>(GetInstance(instance)->BindGraphics(device));
-}
-
-static PP_Bool IsFullFrame(PP_Instance instance) {
- return static_cast<PP_Bool>(GetInstance(instance)->IsFullFrame());
-}
-
-static PP_Var GetWindowObject(PP_Instance instance) {
- return GetInstance(instance)->GetWindowObject();
-}
-
-static PP_Var GetOwnerElementObject(PP_Instance instance) {
- return GetInstance(instance)->GetOwnerElementObject();
-}
-
-static PP_Var ExecuteScript(PP_Instance instance,
- PP_Var script,
- PP_Var* exception) {
- return GetInstance(instance)->ExecuteScript(script, exception);
-}
-
-} // namespace
-
-Instance Instance::kInvalidInstance;
-
-PP_Var Instance::GetWindowObject() {
- DebugPrintf("Instance::GetWindowObject: instance=%"NACL_PRId32"\n",
- instance_id_);
- if (window_)
- return window_->FakeWindowObject();
- else
- return PP_MakeUndefined();
-}
-
-PP_Var Instance::GetOwnerElementObject() {
- DebugPrintf("Instance::GetOwnerElementObject: instance=%"NACL_PRId32"\n",
- instance_id_);
- NACL_UNIMPLEMENTED();
- return PP_MakeUndefined();
-}
-
-bool Instance::BindGraphics(PP_Resource device) {
- DebugPrintf("Instance::BindGraphicsDeviceContext: instance=%"NACL_PRId32"\n",
- ", device=%"NACL_PRIu32"\n",
- instance_id_,
- device);
- NACL_UNIMPLEMENTED();
- return false;
-}
-
-bool Instance::IsFullFrame() {
- DebugPrintf("Instance::IsFullFrame: instance=%"NACL_PRId32"\n",
- instance_id_);
- NACL_UNIMPLEMENTED();
- return false;
-}
-
-PP_Var Instance::ExecuteScript(PP_Var script,
- PP_Var* exception) {
- DebugPrintf("Instance::ExecuteScript: instance=%"NACL_PRId32"\n",
- instance_id_);
- NACL_UNIMPLEMENTED();
- UNREFERENCED_PARAMETER(script);
- UNREFERENCED_PARAMETER(exception);
- return PP_MakeUndefined();
-}
-
-#ifdef PPAPI_INSTANCE_REMOVE_SCRIPTING
-const PPB_Instance* Instance::GetInterface() {
- static const PPB_Instance instance_interface = {
- fake_browser_ppapi::BindGraphics,
- fake_browser_ppapi::IsFullFrame
- };
- return &instance_interface;
-}
-#else
-const PPB_Instance* Instance::GetInterface() {
- static const PPB_Instance instance_interface = {
- fake_browser_ppapi::GetWindowObject,
- fake_browser_ppapi::GetOwnerElementObject,
- fake_browser_ppapi::BindGraphics,
- fake_browser_ppapi::IsFullFrame,
- fake_browser_ppapi::ExecuteScript
- };
- return &instance_interface;
-}
-#endif
-
-const PPB_Instance_Private* Instance::GetPrivateInterface() {
- static const PPB_Instance_Private instance_interface = {
- fake_browser_ppapi::GetWindowObject,
- fake_browser_ppapi::GetOwnerElementObject,
- fake_browser_ppapi::ExecuteScript
- };
- return &instance_interface;
-}
-
-} // namespace fake_browser_ppapi
« no previous file with comments | « tests/fake_browser_ppapi/fake_instance.h ('k') | tests/fake_browser_ppapi/fake_nacl_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698