| 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 #ifndef COMPONENTS_NACL_RENDERER_NACL_HELPER_H_ | 5 #ifndef COMPONENTS_NACL_RENDERER_NACL_HELPER_H_ |
| 6 #define COMPONENTS_NACL_RENDERER_NACL_HELPER_H_ | 6 #define COMPONENTS_NACL_RENDERER_NACL_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "content/public/renderer/render_frame_observer.h" | 10 #include "content/public/renderer/render_frame_observer.h" |
| 11 | 11 |
| 12 namespace nacl { | 12 namespace nacl { |
| 13 | 13 |
| 14 // This class listens for Pepper creation events from the RenderFrame. For the | 14 // This class listens for Pepper creation events from the RenderFrame. For the |
| 15 // NaCl trusted plugin, it configures it as an external plugin host. | 15 // NaCl trusted plugin, it configures it as an external plugin host. |
| 16 // TODO(dmichael): When the trusted plugin goes away, we need to figure out the | 16 // TODO(dmichael): When the trusted plugin goes away, we need to figure out the |
| 17 // right event to watch for. | 17 // right event to watch for. |
| 18 class NaClHelper : public content::RenderFrameObserver { | 18 class NaClHelper : public content::RenderFrameObserver { |
| 19 public: | 19 public: |
| 20 explicit NaClHelper(content::RenderFrame* render_frame); | 20 explicit NaClHelper(content::RenderFrame* render_frame); |
| 21 ~NaClHelper() override; | 21 ~NaClHelper() override; |
| 22 | 22 |
| 23 // RenderFrameObserver. | 23 // RenderFrameObserver. |
| 24 void DidCreatePepperPlugin(content::RendererPpapiHost* host) override; | 24 void DidCreatePepperPlugin(content::RendererPpapiHost* host) override; |
| 25 | 25 |
| 26 private: | 26 private: |
| 27 // RenderFrameObserver implementation. |
| 28 void OnDestruct() override; |
| 29 |
| 27 DISALLOW_COPY_AND_ASSIGN(NaClHelper); | 30 DISALLOW_COPY_AND_ASSIGN(NaClHelper); |
| 28 }; | 31 }; |
| 29 | 32 |
| 30 } // namespace nacl | 33 } // namespace nacl |
| 31 | 34 |
| 32 #endif // COMPONENTS_NACL_RENDERER_NACL_HELPER_H_ | 35 #endif // COMPONENTS_NACL_RENDERER_NACL_HELPER_H_ |
| OLD | NEW |