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

Side by Side Diff: webkit/plugins/ppapi/host_globals.cc

Issue 11859015: Pepper: Introduce ThreadAwareCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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
« no previous file with comments | « webkit/plugins/ppapi/host_globals.h ('k') | no next file » | 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 "webkit/plugins/ppapi/host_globals.h" 5 #include "webkit/plugins/ppapi/host_globals.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 } // namespace 73 } // namespace
74 74
75 HostGlobals* HostGlobals::host_globals_ = NULL; 75 HostGlobals* HostGlobals::host_globals_ = NULL;
76 76
77 HostGlobals::HostGlobals() : ::ppapi::PpapiGlobals() { 77 HostGlobals::HostGlobals() : ::ppapi::PpapiGlobals() {
78 DCHECK(!host_globals_); 78 DCHECK(!host_globals_);
79 host_globals_ = this; 79 host_globals_ = this;
80 } 80 }
81 81
82 HostGlobals::HostGlobals(::ppapi::PpapiGlobals::ForTest for_test) 82 HostGlobals::HostGlobals(
83 : ::ppapi::PpapiGlobals(for_test) { 83 ::ppapi::PpapiGlobals::PerThreadForTest per_thread_for_test)
84 : ::ppapi::PpapiGlobals(per_thread_for_test) {
84 DCHECK(!host_globals_); 85 DCHECK(!host_globals_);
85 } 86 }
86 87
87 HostGlobals::~HostGlobals() { 88 HostGlobals::~HostGlobals() {
88 DCHECK(host_globals_ == this || !host_globals_); 89 DCHECK(host_globals_ == this || !host_globals_);
89 host_globals_ = NULL; 90 host_globals_ = NULL;
90 } 91 }
91 92
92 ::ppapi::ResourceTracker* HostGlobals::GetResourceTracker() { 93 ::ppapi::ResourceTracker* HostGlobals::GetResourceTracker() {
93 return &resource_tracker_; 94 return &resource_tracker_;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 return NULL; 262 return NULL;
262 return found->second; 263 return found->second;
263 } 264 }
264 265
265 bool HostGlobals::IsHostGlobals() const { 266 bool HostGlobals::IsHostGlobals() const {
266 return true; 267 return true;
267 } 268 }
268 269
269 } // namespace ppapi 270 } // namespace ppapi
270 } // namespace webkit 271 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/host_globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698