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

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

Issue 69663002: PPAPI: Implement PPB_FileMapping on POSIX (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows build? Created 6 years, 11 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/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 : resource_(GetResource(resource)), 52 : resource_(GetResource(resource)),
53 retval_(PP_OK) { 53 retval_(PP_OK) {
54 callback_ = new TrackedCallback(resource_, callback); 54 callback_ = new TrackedCallback(resource_, callback);
55 PpapiGlobals::Get()->MarkPluginIsActive(); 55 PpapiGlobals::Get()->MarkPluginIsActive();
56 } 56 }
57 57
58 EnterBase::EnterBase(PP_Instance instance, SingletonResourceID resource_id, 58 EnterBase::EnterBase(PP_Instance instance, SingletonResourceID resource_id,
59 const PP_CompletionCallback& callback) 59 const PP_CompletionCallback& callback)
60 : resource_(GetSingletonResource(instance, resource_id)), 60 : resource_(GetSingletonResource(instance, resource_id)),
61 retval_(PP_OK) { 61 retval_(PP_OK) {
62 DCHECK(resource_ || !instance);
teravest 2014/01/23 21:40:58 Why is this removed?
dmichael (off chromium) 2014/01/24 20:02:50 This case happens for singleton resources if you p
63 if (!resource_) 62 if (!resource_)
64 retval_ = PP_ERROR_BADARGUMENT; 63 retval_ = PP_ERROR_BADARGUMENT;
65 callback_ = new TrackedCallback(resource_, callback); 64 callback_ = new TrackedCallback(resource_, callback);
66 PpapiGlobals::Get()->MarkPluginIsActive(); 65 PpapiGlobals::Get()->MarkPluginIsActive();
67 } 66 }
68 67
69 EnterBase::~EnterBase() { 68 EnterBase::~EnterBase() {
70 // callback_ is cleared any time it is run, scheduled to be run, or once we 69 // callback_ is cleared any time it is run, scheduled to be run, or once we
71 // know it will be completed asynchronously. So by this point it should be 70 // know it will be completed asynchronously. So by this point it should be
72 // NULL. 71 // NULL.
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 : EnterBase(), 309 : EnterBase(),
311 functions_(PpapiGlobals::Get()->GetResourceCreationAPI(instance)) { 310 functions_(PpapiGlobals::Get()->GetResourceCreationAPI(instance)) {
312 SetStateForFunctionError(instance, functions_, true); 311 SetStateForFunctionError(instance, functions_, true);
313 } 312 }
314 313
315 EnterResourceCreationNoLock::~EnterResourceCreationNoLock() { 314 EnterResourceCreationNoLock::~EnterResourceCreationNoLock() {
316 } 315 }
317 316
318 } // namespace thunk 317 } // namespace thunk
319 } // namespace ppapi 318 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698