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

Unified Diff: ppapi/proxy/enter_proxy.h

Issue 7006022: Revert 87415 - Convert more interfaces to the new thunk system. This goes up to and including (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 | « ppapi/ppapi_shared.gypi ('k') | ppapi/proxy/interface_id.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/enter_proxy.h
===================================================================
--- ppapi/proxy/enter_proxy.h (revision 87436)
+++ ppapi/proxy/enter_proxy.h (working copy)
@@ -1,58 +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.
-
-#ifndef PPAPI_PROXY_ENTER_PROXY_H_
-#define PPAPI_PROXY_ENTER_PROXY_H_
-
-#include "base/logging.h"
-#include "ppapi/proxy/host_dispatcher.h"
-#include "ppapi/proxy/plugin_dispatcher.h"
-#include "ppapi/proxy/plugin_resource_tracker.h"
-#include "ppapi/thunk/enter.h"
-
-namespace pp {
-namespace proxy {
-
-// Wrapper around EnterResourceNoLock that takes a host resource. This is used
-// when handling messages in the plugin from the host and we need to convert to
-// an object in the plugin side corresponding to that.
-//
-// This never locks since we assume the host Resource is coming from IPC, and
-// never logs errors since we assume the host is doing reasonable things.
-template<typename ResourceT>
-class EnterPluginFromHostResource
- : public ::ppapi::thunk::EnterResourceNoLock<ResourceT> {
- public:
- EnterPluginFromHostResource(const HostResource& host_resource)
- : ::ppapi::thunk::EnterResourceNoLock<ResourceT>(
- PluginResourceTracker::GetInstance()->PluginResourceForHostResource(
- host_resource),
- false) {
- // Validate that we're in the plugin rather than the host. Otherwise this
- // object will do the wrong thing. In the plugin, the instance should have
- // a corresponding plugin dispatcher (assuming the resource is valid).
- DCHECK(this->failed() ||
- PluginDispatcher::GetForInstance(host_resource.instance()));
- }
-};
-
-template<typename ResourceT>
-class EnterHostFromHostResource
- : public ::ppapi::thunk::EnterResourceNoLock<ResourceT> {
- public:
- EnterHostFromHostResource(const HostResource& host_resource)
- : ::ppapi::thunk::EnterResourceNoLock<ResourceT>(
- host_resource.host_resource(), false) {
- // Validate that we're in the host rather than the plugin. Otherwise this
- // object will do the wrong thing. In the host, the instance should have
- // a corresponding host disptacher (assuming the resource is valid).
- DCHECK(this->failed() ||
- HostDispatcher::GetForInstance(host_resource.instance()));
- }
-};
-
-} // namespace proxy
-} // namespace pp
-
-#endif // PPAPI_PROXY_ENTER_PROXY_H_
« no previous file with comments | « ppapi/ppapi_shared.gypi ('k') | ppapi/proxy/interface_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698