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

Side by Side Diff: ppapi/shared_impl/host_resource.h

Issue 7623018: Move host resource from the proxy to the shared_impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/serialized_structs.h ('k') | ppapi/thunk/ppb_pdf_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_HOST_RESOURCE_H_ 5 #ifndef PPAPI_SHARED_IMPL_HOST_RESOURCE_H_
6 #define PPAPI_PROXY_HOST_RESOURCE_H_ 6 #define PPAPI_SHARED_IMPL_HOST_RESOURCE_H_
7 7
8 #include "ppapi/c/pp_instance.h" 8 #include "ppapi/c/pp_instance.h"
9 #include "ppapi/c/pp_resource.h" 9 #include "ppapi/c/pp_resource.h"
10 10
11 namespace pp { 11 namespace ppapi {
12 namespace proxy {
13 12
14 // Represents a PP_Resource sent over the wire. This just wraps a PP_Resource. 13 // Represents a PP_Resource sent over the wire. This just wraps a PP_Resource.
15 // The point is to prevent mistakes where the wrong resource value is sent. 14 // The point is to prevent mistakes where the wrong resource value is sent.
16 // Resource values are remapped in the plugin so that it can talk to multiple 15 // Resource values are remapped in the plugin so that it can talk to multiple
17 // hosts. If all values were PP_Resource, it would be easy to forget to do 16 // hosts. If all values were PP_Resource, it would be easy to forget to do
18 // this tranformation. 17 // this tranformation.
19 // 18 //
20 // All HostResources respresent IDs valid in the host. 19 // All HostResources respresent IDs valid in the host.
21 class HostResource { 20 class HostResource {
22 public: 21 public:
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 if (instance_ != other.instance_) 56 if (instance_ != other.instance_)
58 return instance_ < other.instance_; 57 return instance_ < other.instance_;
59 return host_resource_ < other.host_resource_; 58 return host_resource_ < other.host_resource_;
60 } 59 }
61 60
62 private: 61 private:
63 PP_Instance instance_; 62 PP_Instance instance_;
64 PP_Resource host_resource_; 63 PP_Resource host_resource_;
65 }; 64 };
66 65
67 } // namespace proxy 66 } // namespace ppapi
68 } // namespace pp
69 67
70 #endif // PPAPI_PROXY_HOST_RESOURCE_H_ 68 #endif // PPAPI_SHARED_IMPL_HOST_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/serialized_structs.h ('k') | ppapi/thunk/ppb_pdf_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698