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

Unified Diff: ppapi/proxy/compositor_resource.h

Issue 324983005: [PPAPI] Add browser tests for compositor API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compositor_api_impl_new
Patch Set: Fix review issues Created 6 years, 6 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
Index: ppapi/proxy/compositor_resource.h
diff --git a/ppapi/proxy/compositor_resource.h b/ppapi/proxy/compositor_resource.h
index f3d13d4ffc71ab522051f80a97538c4599738011..923257c80a04d41f943152b6b207ac6663f2b3f7 100644
--- a/ppapi/proxy/compositor_resource.h
+++ b/ppapi/proxy/compositor_resource.h
@@ -10,6 +10,7 @@
#include "ppapi/proxy/compositor_layer_resource.h"
#include "ppapi/proxy/plugin_resource.h"
#include "ppapi/proxy/ppapi_proxy_export.h"
+#include "ppapi/shared_impl/proxy_lock.h"
#include "ppapi/thunk/ppb_compositor_api.h"
namespace ppapi {
@@ -23,10 +24,17 @@ class PPAPI_PROXY_EXPORT CompositorResource
PP_Instance instance);
bool IsInProgress() const {
+ ProxyLock::AssertAcquiredDebugOnly();
return TrackedCallback::IsPending(commit_callback_);
}
+ bool bound_to_instance() const {
+ ProxyLock::AssertAcquiredDebugOnly();
+ return bound_to_instance_;
+ }
+
int32_t GenerateResourceId() const {
+ ProxyLock::AssertAcquiredDebugOnly();
return ++last_resource_id_;
}
raymes 2014/06/18 05:58:44 nit: Could you move these to the implementation?
Peng 2014/06/18 11:14:37 Move it on cc file? Done
raymes 2014/06/19 00:39:13 The same with the above 2 methods.
Peng 2014/06/19 17:35:11 Done.
@@ -37,6 +45,7 @@ class PPAPI_PROXY_EXPORT CompositorResource
virtual thunk::PPB_Compositor_API* AsPPB_Compositor_API() OVERRIDE;
// PluginResource overrides:
+ virtual void NotifyLastPluginRefWasDeleted() OVERRIDE;
virtual void OnReplyReceived(const ResourceMessageReplyParams& params,
const IPC::Message& msg) OVERRIDE;
@@ -45,6 +54,7 @@ class PPAPI_PROXY_EXPORT CompositorResource
virtual int32_t CommitLayers(
const scoped_refptr<TrackedCallback>& callback) OVERRIDE;
virtual int32_t ResetLayers() OVERRIDE;
+ virtual void BindToInstance(bool bound) OVERRIDE;
// IPC msg handlers:
void OnPluginMsgCommitLayersReply(const ResourceMessageReplyParams& params);
@@ -71,6 +81,8 @@ class PPAPI_PROXY_EXPORT CompositorResource
typedef std::map<int32_t, ReleaseCallback> ReleaseCallbackMap;
ReleaseCallbackMap release_callback_map_;
+ bool bound_to_instance_;
+
// The last resource id for texture or image.
mutable int32_t last_resource_id_;

Powered by Google App Engine
This is Rietveld 408576698