OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "webkit/plugins/ppapi/host_globals.h" |
| 6 |
| 7 namespace webkit { |
| 8 namespace ppapi { |
| 9 |
| 10 HostGlobals* HostGlobals::host_globals_ = NULL; |
| 11 |
| 12 HostGlobals::HostGlobals() : ::ppapi::PpapiGlobals() { |
| 13 DCHECK(!host_globals_); |
| 14 host_globals_ = this; |
| 15 } |
| 16 |
| 17 HostGlobals::~HostGlobals() { |
| 18 DCHECK(host_globals_ == this); |
| 19 host_globals_ = NULL; |
| 20 } |
| 21 |
| 22 ::ppapi::ResourceTracker* HostGlobals::GetResourceTracker() { |
| 23 return &host_resource_tracker_; |
| 24 } |
| 25 |
| 26 ::ppapi::VarTracker* HostGlobals::GetVarTracker() { |
| 27 return &host_var_tracker_; |
| 28 } |
| 29 |
| 30 } // namespace ppapi |
| 31 } // namespace webkit |
OLD | NEW |