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

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

Issue 10544089: Implement the file chooser as a new resource "host" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.h ('k') | ppapi/proxy/ppb_file_ref_proxy.h » ('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/ppapi_proxy_test.h" 5 #include "ppapi/proxy/ppapi_proxy_test.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 base::Bind(&TearDownRemoteHarness, 399 base::Bind(&TearDownRemoteHarness,
400 remote_harness_, 400 remote_harness_,
401 &remote_harness_torn_down)); 401 &remote_harness_torn_down));
402 remote_harness_torn_down.Wait(); 402 remote_harness_torn_down.Wait();
403 403
404 local_harness_->TearDownHarness(); 404 local_harness_->TearDownHarness();
405 405
406 io_thread_.Stop(); 406 io_thread_.Stop();
407 } 407 }
408 408
409 // ScopedPPResource -----------------------------------------------------------
410
411 /*
412 ScopedPPResource::ScopedPPResource() : resource_(0) {
413 }
414
415 ScopedPPResource::ScopedPPResource(PP_Resource r) : resource_(r) {
416 }
417
418 ScopedPPResource::ScopedPPResource(const ScopedPPResource& other)
419 : resource_(other.resource_) {
420 PpapiGlobals::Get()->GetResourceTracker()->AddRefResource(resource_);
421 }
422
423 ScopedPPResource::~ScopedPPResource() {
424 PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(resource_);
425 }
426
427 ScopedPPResource& ScopedPPResource::operator=(PP_Resource r) {
428 if (r)
429 PpapiGlobals::Get()->GetResourceTracker()->AddRefResource(r);
430 if (resource_)
431 PpapiGlobals::Get()->GetResourceTracker()->ReleaseResource(resource_);
432 resource_ = r;
433 return *this;
434 }
435 */
436 // ScopedPPVar ----------------------------------------------------------------
437
438 ScopedPPVar::ScopedPPVar() : var_(PP_MakeUndefined()) {
439 }
440
441 ScopedPPVar::ScopedPPVar(const PP_Var& v) : var_(v) {
442 }
443
444 ScopedPPVar::ScopedPPVar(const ScopedPPVar& other)
445 : var_(other.var_) {
446 PpapiGlobals::Get()->GetVarTracker()->AddRefVar(var_);
447 }
448
449 ScopedPPVar::~ScopedPPVar() {
450 PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(var_);
451 }
452
453 ScopedPPVar& ScopedPPVar::operator=(const PP_Var& v) {
454 PpapiGlobals::Get()->GetVarTracker()->AddRefVar(v);
455 PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(var_);
456 var_ = v;
457 return *this;
458 }
409 459
410 } // namespace proxy 460 } // namespace proxy
411 } // namespace ppapi 461 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.h ('k') | ppapi/proxy/ppb_file_ref_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698