[Android] Added UMA for search by image context menu.
[chromium-blink-merge.git] / chrome / renderer / pepper / pepper_flash_drm_renderer_host.h
bloba0382b68fe8ccf819774cd0f1d2746d51b83a5ad
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.
5 #ifndef CHROME_RENDERER_PEPPER_PEPPER_FLASH_DRM_RENDERER_HOST_H_
6 #define CHROME_RENDERER_PEPPER_PEPPER_FLASH_DRM_RENDERER_HOST_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h"
11 #include "ppapi/host/resource_host.h"
13 namespace base {
14 class FilePath;
17 namespace content {
18 class RendererPpapiHost;
21 namespace chrome {
23 // TODO(raymes): This is only needed until we move FileRef resources to the
24 // browser. After that, get rid of this class altogether.
25 class PepperFlashDRMRendererHost : public ppapi::host::ResourceHost {
26 public:
27 PepperFlashDRMRendererHost(content::RendererPpapiHost* host,
28 PP_Instance instance,
29 PP_Resource resource);
30 virtual ~PepperFlashDRMRendererHost();
32 virtual int32_t OnResourceMessageReceived(
33 const IPC::Message& msg,
34 ppapi::host::HostMessageContext* context) OVERRIDE;
36 private:
37 int32_t OnGetVoucherFile(ppapi::host::HostMessageContext* context);
39 void DidCreateFileRefHost(
40 const ppapi::host::ReplyMessageContext& reply_context,
41 const base::FilePath& external_path,
42 int pending_resource_id);
44 // Non-owning pointer.
45 content::RendererPpapiHost* renderer_ppapi_host_;
47 base::WeakPtrFactory<PepperFlashDRMRendererHost> weak_factory_;
49 DISALLOW_COPY_AND_ASSIGN(PepperFlashDRMRendererHost);
52 } // namespace chrome
54 #endif // CHROME_RENDERER_PEPPER_PEPPER_FLASH_DRM_RENDERER_HOST_H_