summaryrefslogtreecommitdiffstats
path: root/components/nacl/renderer/nacl_helper.h
blob: 4c28bf71bc6a92c1f4ba2e799c3004b244dea69c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_NACL_RENDERER_NACL_HELPER_H_
#define COMPONENTS_NACL_RENDERER_NACL_HELPER_H_

#include "base/compiler_specific.h"
#include "content/public/renderer/render_frame_observer.h"

namespace nacl {

// This class listens for Pepper creation events from the RenderFrame. For the
// NaCl trusted plugin, it configures it as an external plugin host.
// TODO(dmichael): When the trusted plugin goes away, we need to figure out the
//                 right event to watch for.
class NaClHelper : public content::RenderFrameObserver {
 public:
  explicit NaClHelper(content::RenderFrame* render_frame);
  virtual ~NaClHelper();

  // RenderFrameObserver.
  virtual void DidCreatePepperPlugin(content::RendererPpapiHost* host) override;

 private:
  DISALLOW_COPY_AND_ASSIGN(NaClHelper);
};

}  // namespace nacl

#endif  // COMPONENTS_NACL_RENDERER_NACL_HELPER_H_