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

Side by Side Diff: ppapi/proxy/video_capture_resource.cc

Issue 915403003: Enable size_t to int truncation warnings in PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ppapi_unittests win x64 Created 5 years, 10 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
« no previous file with comments | « ppapi/proxy/url_loader_resource.cc ('k') | ppapi/proxy/websocket_resource.cc » ('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) 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 "ppapi/proxy/video_capture_resource.h" 5 #include "ppapi/proxy/video_capture_resource.h"
6 6
7 #include "ppapi/c/dev/ppp_video_capture_dev.h" 7 #include "ppapi/c/dev/ppp_video_capture_dev.h"
8 #include "ppapi/proxy/dispatch_reply_message.h" 8 #include "ppapi/proxy/dispatch_reply_message.h"
9 #include "ppapi/proxy/plugin_dispatcher.h" 9 #include "ppapi/proxy/plugin_dispatcher.h"
10 #include "ppapi/proxy/plugin_globals.h" 10 #include "ppapi/proxy/plugin_globals.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 resources[i] = ppapi::proxy::PPB_Buffer_Proxy::AddProxyResource( 159 resources[i] = ppapi::proxy::PPB_Buffer_Proxy::AddProxyResource(
160 buffers[i], handles[i], buffer_size); 160 buffers[i], handles[i], buffer_size);
161 } 161 }
162 162
163 buffer_in_use_ = std::vector<bool>(buffers.size()); 163 buffer_in_use_ = std::vector<bool>(buffers.size());
164 164
165 CallWhileUnlocked(ppp_video_capture_impl_->OnDeviceInfo, 165 CallWhileUnlocked(ppp_video_capture_impl_->OnDeviceInfo,
166 pp_instance(), 166 pp_instance(),
167 pp_resource(), 167 pp_resource(),
168 &info, 168 &info,
169 buffers.size(), 169 static_cast<uint32_t>(buffers.size()),
170 resources.get()); 170 resources.get());
171 171
172 for (size_t i = 0; i < buffers.size(); ++i) 172 for (size_t i = 0; i < buffers.size(); ++i)
173 tracker->ReleaseResource(resources[i]); 173 tracker->ReleaseResource(resources[i]);
174 } 174 }
175 175
176 void VideoCaptureResource::OnPluginMsgOnStatus( 176 void VideoCaptureResource::OnPluginMsgOnStatus(
177 const ResourceMessageReplyParams& params, 177 const ResourceMessageReplyParams& params,
178 uint32_t status) { 178 uint32_t status) {
179 switch (status) { 179 switch (status) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 open_callback_->Run(params.result()); 225 open_callback_->Run(params.result());
226 } 226 }
227 227
228 void VideoCaptureResource::SetBufferInUse(uint32_t buffer_index) { 228 void VideoCaptureResource::SetBufferInUse(uint32_t buffer_index) {
229 CHECK(buffer_index < buffer_in_use_.size()); 229 CHECK(buffer_index < buffer_in_use_.size());
230 buffer_in_use_[buffer_index] = true; 230 buffer_in_use_[buffer_index] = true;
231 } 231 }
232 232
233 } // namespace proxy 233 } // namespace proxy
234 } // namespace ppapi 234 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/url_loader_resource.cc ('k') | ppapi/proxy/websocket_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698