OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/nacl/renderer/nacl_helper.h" | 5 #include "components/nacl/renderer/nacl_helper.h" |
6 | 6 |
7 #include "content/public/renderer/renderer_ppapi_host.h" | 7 #include "content/public/renderer/renderer_ppapi_host.h" |
8 | 8 |
9 namespace nacl { | 9 namespace nacl { |
10 | 10 |
11 NaClHelper::NaClHelper(content::RenderFrame* render_frame) | 11 NaClHelper::NaClHelper(content::RenderFrame* render_frame) |
12 : RenderFrameObserver(render_frame) {} | 12 : RenderFrameObserver(render_frame) {} |
13 | 13 |
14 NaClHelper::~NaClHelper() {} | 14 NaClHelper::~NaClHelper() {} |
15 | 15 |
16 void NaClHelper::DidCreatePepperPlugin(content::RendererPpapiHost* host) { | 16 void NaClHelper::DidCreatePepperPlugin(content::RendererPpapiHost* host) { |
17 // The Native Client plugin is a host for external plugins. | 17 // The Native Client plugin is a host for external plugins. |
18 if (host->GetPluginName() == "Native Client") | 18 if (host->GetPluginName() == "Native Client") |
19 host->SetToExternalPluginHost(); | 19 host->SetToExternalPluginHost(); |
20 } | 20 } |
21 | 21 |
| 22 void NaClHelper::OnDestruct() { |
| 23 delete this; |
| 24 } |
| 25 |
22 } // namespace nacl | 26 } // namespace nacl |
OLD | NEW |