OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
8 #include "ppapi/proxy/connection.h" | 8 #include "ppapi/proxy/connection.h" |
9 #include "ppapi/proxy/device_enumeration_resource_helper.h" | 9 #include "ppapi/proxy/device_enumeration_resource_helper.h" |
10 #include "ppapi/proxy/plugin_resource.h" | 10 #include "ppapi/proxy/plugin_resource.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 result = true; | 60 result = true; |
61 } while (false); | 61 } while (false); |
62 var_tracker->ReleaseVar(name_pp_var); | 62 var_tracker->ReleaseVar(name_pp_var); |
63 return result; | 63 return result; |
64 } | 64 } |
65 | 65 |
66 class TestResource : public PluginResource { | 66 class TestResource : public PluginResource { |
67 public: | 67 public: |
68 TestResource(Connection connection, PP_Instance instance) | 68 TestResource(Connection connection, PP_Instance instance) |
69 : PluginResource(connection, instance), | 69 : PluginResource(connection, instance), |
70 ALLOW_THIS_IN_INITIALIZER_LIST(device_enumeration_(this)) { | 70 device_enumeration_(this) { |
71 } | 71 } |
72 | 72 |
73 virtual ~TestResource() {} | 73 virtual ~TestResource() {} |
74 | 74 |
75 virtual void OnReplyReceived(const ResourceMessageReplyParams& params, | 75 virtual void OnReplyReceived(const ResourceMessageReplyParams& params, |
76 const IPC::Message& msg) OVERRIDE { | 76 const IPC::Message& msg) OVERRIDE { |
77 if (!device_enumeration_.HandleReply(params, msg)) | 77 if (!device_enumeration_.HandleReply(params, msg)) |
78 PluginResource::OnReplyReceived(params, msg); | 78 PluginResource::OnReplyReceived(params, msg); |
79 } | 79 } |
80 | 80 |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 PpapiPluginMsg_ResourceReply( | 400 PpapiPluginMsg_ResourceReply( |
401 reply_params, | 401 reply_params, |
402 PpapiPluginMsg_DeviceEnumeration_NotifyDeviceChange( | 402 PpapiPluginMsg_DeviceEnumeration_NotifyDeviceChange( |
403 callback_id2, data)))); | 403 callback_id2, data)))); |
404 } | 404 } |
405 EXPECT_FALSE(helper2.called()); | 405 EXPECT_FALSE(helper2.called()); |
406 } | 406 } |
407 | 407 |
408 } // namespace proxy | 408 } // namespace proxy |
409 } // namespace ppapi | 409 } // namespace ppapi |
OLD | NEW |