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_message_filter.h" | 10 #include "ppapi/proxy/plugin_message_filter.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 class TestResource : public PluginResource { | 67 class TestResource : public PluginResource { |
68 public: | 68 public: |
69 TestResource(Connection connection, PP_Instance instance) | 69 TestResource(Connection connection, PP_Instance instance) |
70 : PluginResource(connection, instance), | 70 : PluginResource(connection, instance), |
71 device_enumeration_(this) { | 71 device_enumeration_(this) { |
72 } | 72 } |
73 | 73 |
74 virtual ~TestResource() {} | 74 virtual ~TestResource() {} |
75 | 75 |
76 virtual void OnReplyReceived(const ResourceMessageReplyParams& params, | 76 virtual void OnReplyReceived(const ResourceMessageReplyParams& params, |
77 const IPC::Message& msg) OVERRIDE { | 77 const IPC::Message& msg) override { |
78 if (!device_enumeration_.HandleReply(params, msg)) | 78 if (!device_enumeration_.HandleReply(params, msg)) |
79 PluginResource::OnReplyReceived(params, msg); | 79 PluginResource::OnReplyReceived(params, msg); |
80 } | 80 } |
81 | 81 |
82 DeviceEnumerationResourceHelper& device_enumeration() { | 82 DeviceEnumerationResourceHelper& device_enumeration() { |
83 return device_enumeration_; | 83 return device_enumeration_; |
84 } | 84 } |
85 | 85 |
86 private: | 86 private: |
87 DeviceEnumerationResourceHelper device_enumeration_; | 87 DeviceEnumerationResourceHelper device_enumeration_; |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 PluginMessageFilter::DispatchResourceReplyForTest( | 395 PluginMessageFilter::DispatchResourceReplyForTest( |
396 reply_params, | 396 reply_params, |
397 PpapiPluginMsg_DeviceEnumeration_NotifyDeviceChange( | 397 PpapiPluginMsg_DeviceEnumeration_NotifyDeviceChange( |
398 callback_id2, data)); | 398 callback_id2, data)); |
399 } | 399 } |
400 EXPECT_FALSE(helper2.called()); | 400 EXPECT_FALSE(helper2.called()); |
401 } | 401 } |
402 | 402 |
403 } // namespace proxy | 403 } // namespace proxy |
404 } // namespace ppapi | 404 } // namespace ppapi |
OLD | NEW |