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

Side by Side Diff: ppapi/thunk/enter.cc

Issue 10699045: Fix PPB_MouseLock.LockMouse crash and add tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
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/thunk/enter.h" 5 #include "ppapi/thunk/enter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 EnterInstance::~EnterInstance() { 231 EnterInstance::~EnterInstance() {
232 } 232 }
233 233
234 EnterInstanceNoLock::EnterInstanceNoLock(PP_Instance instance) 234 EnterInstanceNoLock::EnterInstanceNoLock(PP_Instance instance)
235 : EnterBase(), 235 : EnterBase(),
236 functions_(PpapiGlobals::Get()->GetInstanceAPI(instance)) { 236 functions_(PpapiGlobals::Get()->GetInstanceAPI(instance)) {
237 SetStateForFunctionError(instance, functions_, true); 237 SetStateForFunctionError(instance, functions_, true);
238 } 238 }
239 239
240 EnterInstanceNoLock::EnterInstanceNoLock(
241 PP_Instance instance,
242 const PP_CompletionCallback& callback)
243 : EnterBase(0 /* resource */, callback),
244 // TODO(dmichael): This means that the callback_ we get is not associated
245 // even with the instance, but we should handle that for
246 // MouseLock (maybe others?).
247 functions_(PpapiGlobals::Get()->GetInstanceAPI(instance)) {
248 SetStateForFunctionError(instance, functions_, true);
249 }
250
240 EnterInstanceNoLock::~EnterInstanceNoLock() { 251 EnterInstanceNoLock::~EnterInstanceNoLock() {
241 } 252 }
242 253
243 EnterResourceCreation::EnterResourceCreation(PP_Instance instance) 254 EnterResourceCreation::EnterResourceCreation(PP_Instance instance)
244 : EnterBase(), 255 : EnterBase(),
245 functions_(PpapiGlobals::Get()->GetResourceCreationAPI(instance)) { 256 functions_(PpapiGlobals::Get()->GetResourceCreationAPI(instance)) {
246 SetStateForFunctionError(instance, functions_, true); 257 SetStateForFunctionError(instance, functions_, true);
247 } 258 }
248 259
249 EnterResourceCreation::~EnterResourceCreation() { 260 EnterResourceCreation::~EnterResourceCreation() {
250 } 261 }
251 262
252 EnterResourceCreationNoLock::EnterResourceCreationNoLock(PP_Instance instance) 263 EnterResourceCreationNoLock::EnterResourceCreationNoLock(PP_Instance instance)
253 : EnterBase(), 264 : EnterBase(),
254 functions_(PpapiGlobals::Get()->GetResourceCreationAPI(instance)) { 265 functions_(PpapiGlobals::Get()->GetResourceCreationAPI(instance)) {
255 SetStateForFunctionError(instance, functions_, true); 266 SetStateForFunctionError(instance, functions_, true);
256 } 267 }
257 268
258 EnterResourceCreationNoLock::~EnterResourceCreationNoLock() { 269 EnterResourceCreationNoLock::~EnterResourceCreationNoLock() {
259 } 270 }
260 271
261 } // namespace thunk 272 } // namespace thunk
262 } // namespace ppapi 273 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698