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 "content/renderer/pepper/mock_renderer_ppapi_host.h" | 5 #include "content/renderer/pepper/mock_renderer_ppapi_host.h" |
6 | 6 |
7 #include "content/renderer/pepper/fake_pepper_plugin_instance.h" | 7 #include "content/renderer/pepper/fake_pepper_plugin_instance.h" |
| 8 #include "ppapi/proxy/ppapi_messages.h" |
8 #include "ui/gfx/point.h" | 9 #include "ui/gfx/point.h" |
9 | 10 |
10 namespace content { | 11 namespace content { |
11 | 12 |
12 MockRendererPpapiHost::MockRendererPpapiHost(RenderView* render_view, | 13 MockRendererPpapiHost::MockRendererPpapiHost(RenderView* render_view, |
13 PP_Instance instance) | 14 PP_Instance instance) |
14 : sink_(), | 15 : sink_(), |
15 ppapi_host_(&sink_, ppapi::PpapiPermissions()), | 16 ppapi_host_(&sink_, ppapi::PpapiPermissions()), |
16 render_view_(render_view), | 17 render_view_(render_view), |
17 pp_instance_(instance), | 18 pp_instance_(instance), |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 bool MockRendererPpapiHost::IsRunningInProcess() const { return false; } | 81 bool MockRendererPpapiHost::IsRunningInProcess() const { return false; } |
81 | 82 |
82 std::string MockRendererPpapiHost::GetPluginName() const { | 83 std::string MockRendererPpapiHost::GetPluginName() const { |
83 return std::string(); | 84 return std::string(); |
84 } | 85 } |
85 | 86 |
86 void MockRendererPpapiHost::SetToExternalPluginHost() { | 87 void MockRendererPpapiHost::SetToExternalPluginHost() { |
87 NOTIMPLEMENTED(); | 88 NOTIMPLEMENTED(); |
88 } | 89 } |
89 | 90 |
90 void MockRendererPpapiHost::CreateBrowserResourceHosts( | 91 int32_t MockRendererPpapiHost::CreateBrowserResourceHosts( |
91 PP_Instance instance, | 92 PP_Instance instance, |
92 const std::vector<IPC::Message>& nested_msgs, | 93 const std::vector<IPC::Message>& nested_msgs, |
93 const base::Callback<void(const std::vector<int>&)>& callback) const { | 94 const PendingResourceCallback& callback) const { |
94 callback.Run(std::vector<int>(nested_msgs.size(), 0)); | 95 ppapi::proxy::CompletedBrowserResourceHosts dummy; |
95 return; | 96 dummy.host_ids.resize(nested_msgs.size()); |
| 97 callback.Run(dummy); |
| 98 return -1; |
96 } | 99 } |
97 | 100 |
98 GURL MockRendererPpapiHost::GetDocumentURL(PP_Instance instance) const { | 101 GURL MockRendererPpapiHost::GetDocumentURL(PP_Instance instance) const { |
99 NOTIMPLEMENTED(); | 102 NOTIMPLEMENTED(); |
100 return GURL(); | 103 return GURL(); |
101 } | 104 } |
102 | 105 |
103 } // namespace content | 106 } // namespace content |
OLD | NEW |