Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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/host_dispatcher.h" | 5 #include "ppapi/proxy/host_dispatcher.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "ppapi/c/private/ppb_proxy_private.h" | 10 #include "ppapi/c/private/ppb_proxy_private.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 226 // the proxy does. If this happens, something is out of sync. | 226 // the proxy does. If this happens, something is out of sync. |
| 227 NOTREACHED(); | 227 NOTREACHED(); |
| 228 return NULL; | 228 return NULL; |
| 229 } | 229 } |
| 230 | 230 |
| 231 InterfaceProxy* proxy = info->create_proxy(this, local_interface); | 231 InterfaceProxy* proxy = info->create_proxy(this, local_interface); |
| 232 target_proxies_[info->id].reset(proxy); | 232 target_proxies_[info->id].reset(proxy); |
| 233 return proxy; | 233 return proxy; |
| 234 } | 234 } |
| 235 | 235 |
| 236 | |
|
viettrungluu
2011/04/18 19:53:41
Nit: Is the extra blank line really necessary?
| |
| 237 // ScopedModuleReference ------------------------------------------------------- | |
| 238 | |
| 239 ScopedModuleReference::ScopedModuleReference(Dispatcher* dispatcher) { | |
| 240 DCHECK(!dispatcher->IsPlugin()); | |
| 241 dispatcher_ = static_cast<HostDispatcher*>(dispatcher); | |
| 242 dispatcher_->ppb_proxy()->AddRefModule(dispatcher_->pp_module()); | |
| 243 } | |
| 244 | |
| 245 ScopedModuleReference::~ScopedModuleReference() { | |
| 246 dispatcher_->ppb_proxy()->ReleaseModule(dispatcher_->pp_module()); | |
| 247 } | |
| 248 | |
| 236 } // namespace proxy | 249 } // namespace proxy |
| 237 } // namespace pp | 250 } // namespace pp |
| 238 | 251 |
| OLD | NEW |