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

Side by Side 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: Remove change in base folder. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_PROXY_COMPOSITOR_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_COMPOSITOR_RESOURCE_H_
6 #define PPAPI_PROXY_COMPOSITOR_RESOURCE_H_ 6 #define PPAPI_PROXY_COMPOSITOR_RESOURCE_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "ppapi/proxy/compositor_layer_resource.h" 10 #include "ppapi/proxy/compositor_layer_resource.h"
11 #include "ppapi/proxy/plugin_resource.h" 11 #include "ppapi/proxy/plugin_resource.h"
12 #include "ppapi/proxy/ppapi_proxy_export.h" 12 #include "ppapi/proxy/ppapi_proxy_export.h"
13 #include "ppapi/shared_impl/proxy_lock.h"
13 #include "ppapi/thunk/ppb_compositor_api.h" 14 #include "ppapi/thunk/ppb_compositor_api.h"
14 15
15 namespace ppapi { 16 namespace ppapi {
16 namespace proxy { 17 namespace proxy {
17 18
18 class PPAPI_PROXY_EXPORT CompositorResource 19 class PPAPI_PROXY_EXPORT CompositorResource
19 : public PluginResource, 20 : public PluginResource,
20 public thunk::PPB_Compositor_API { 21 public thunk::PPB_Compositor_API {
21 public: 22 public:
22 CompositorResource(Connection connection, 23 CompositorResource(Connection connection,
23 PP_Instance instance); 24 PP_Instance instance);
24 25
25 bool IsInProgress() const { 26 bool IsInProgress() const;
26 return TrackedCallback::IsPending(commit_callback_);
27 }
28 27
29 int32_t GenerateResourceId() const { 28 int32_t GenerateResourceId() const;
30 return ++last_resource_id_;
31 }
32 29
33 private: 30 private:
34 virtual ~CompositorResource(); 31 virtual ~CompositorResource();
35 32
36 // Resource overrides: 33 // Resource overrides:
37 virtual thunk::PPB_Compositor_API* AsPPB_Compositor_API() OVERRIDE; 34 virtual thunk::PPB_Compositor_API* AsPPB_Compositor_API() OVERRIDE;
38 35
39 // PluginResource overrides: 36 // PluginResource overrides:
37 virtual void NotifyLastPluginRefWasDeleted() OVERRIDE;
40 virtual void OnReplyReceived(const ResourceMessageReplyParams& params, 38 virtual void OnReplyReceived(const ResourceMessageReplyParams& params,
41 const IPC::Message& msg) OVERRIDE; 39 const IPC::Message& msg) OVERRIDE;
42 40
43 // thunk::PPB_Compositor_API overrides: 41 // thunk::PPB_Compositor_API overrides:
44 virtual PP_Resource AddLayer() OVERRIDE; 42 virtual PP_Resource AddLayer() OVERRIDE;
45 virtual int32_t CommitLayers( 43 virtual int32_t CommitLayers(
46 const scoped_refptr<TrackedCallback>& callback) OVERRIDE; 44 const scoped_refptr<TrackedCallback>& callback) OVERRIDE;
47 virtual int32_t ResetLayers() OVERRIDE; 45 virtual int32_t ResetLayers() OVERRIDE;
48 46
49 // IPC msg handlers: 47 // IPC msg handlers:
(...skipping 24 matching lines...) Expand all
74 // The last resource id for texture or image. 72 // The last resource id for texture or image.
75 mutable int32_t last_resource_id_; 73 mutable int32_t last_resource_id_;
76 74
77 DISALLOW_COPY_AND_ASSIGN(CompositorResource); 75 DISALLOW_COPY_AND_ASSIGN(CompositorResource);
78 }; 76 };
79 77
80 } // namespace proxy 78 } // namespace proxy
81 } // namespace ppapi 79 } // namespace ppapi
82 80
83 #endif // PPAPI_PROXY_COMPOSITOR_RESOURCE_H_ 81 #endif // PPAPI_PROXY_COMPOSITOR_RESOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698