Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ppapi/host/instance_message_filter.h" | |
| 6 | |
| 7 #include "ppapi/host/ppapi_host.h" | |
| 8 | |
| 9 namespace ppapi { | |
| 10 namespace host { | |
| 11 | |
| 12 InstanceMessageFilter::InstanceMessageFilter(PpapiHost* host) | |
| 13 : host_(host) { | |
| 14 host_->AddInstanceMessageFilter(this); | |
| 15 } | |
| 16 | |
| 17 InstanceMessageFilter::~InstanceMessageFilter() { | |
| 18 if (host_) | |
| 19 host_->RemoveInstanceMessageFilter(this); | |
| 20 } | |
| 21 | |
| 22 void InstanceMessageFilter::CallPpapiHostDestroyed() { | |
| 23 host_->RemoveInstanceMessageFilter(this); | |
| 24 PpapiHost* host = host_; | |
| 25 host_ = NULL; | |
| 26 PpapiHostDestroyed(host); | |
|
dmichael (off chromium)
2012/07/25 16:57:27
If the host is in the process of being destroyed,
brettw
2012/07/26 16:18:12
This seems reasonable. I'm not actually sure how t
| |
| 27 } | |
| 28 | |
| 29 } // namespace host | |
| 30 } // namespace ppapi | |
| OLD | NEW |