Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(758)

Side by Side Diff: chrome/renderer/pepper/pepper_flash_drm_renderer_host.h

Issue 730603002: PPAPI: Refactor renderer side of browser host creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/renderer/pepper/pepper_flash_drm_renderer_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 CHROME_RENDERER_PEPPER_PEPPER_FLASH_DRM_RENDERER_HOST_H_ 5 #ifndef CHROME_RENDERER_PEPPER_PEPPER_FLASH_DRM_RENDERER_HOST_H_
6 #define CHROME_RENDERER_PEPPER_PEPPER_FLASH_DRM_RENDERER_HOST_H_ 6 #define CHROME_RENDERER_PEPPER_PEPPER_FLASH_DRM_RENDERER_HOST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "ppapi/host/resource_host.h" 11 #include "ppapi/host/resource_host.h"
12 12
13 namespace base { 13 namespace base {
14 class FilePath; 14 class FilePath;
15 } 15 }
16 16
17 namespace content { 17 namespace content {
18 class RendererPpapiHost; 18 class RendererPpapiHost;
19 } 19 }
20 20
21 namespace ppapi {
22 namespace proxy {
23 struct CompletedBrowserResourceHosts;
24 }
25 }
26
21 // TODO(raymes): This is only needed until we move FileRef resources to the 27 // TODO(raymes): This is only needed until we move FileRef resources to the
22 // browser. After that, get rid of this class altogether. 28 // browser. After that, get rid of this class altogether.
23 class PepperFlashDRMRendererHost : public ppapi::host::ResourceHost { 29 class PepperFlashDRMRendererHost : public ppapi::host::ResourceHost {
24 public: 30 public:
25 PepperFlashDRMRendererHost(content::RendererPpapiHost* host, 31 PepperFlashDRMRendererHost(content::RendererPpapiHost* host,
26 PP_Instance instance, 32 PP_Instance instance,
27 PP_Resource resource); 33 PP_Resource resource);
28 ~PepperFlashDRMRendererHost() override; 34 ~PepperFlashDRMRendererHost() override;
29 35
30 int32_t OnResourceMessageReceived( 36 int32_t OnResourceMessageReceived(
31 const IPC::Message& msg, 37 const IPC::Message& msg,
32 ppapi::host::HostMessageContext* context) override; 38 ppapi::host::HostMessageContext* context) override;
33 39
34 private: 40 private:
35 int32_t OnGetVoucherFile(ppapi::host::HostMessageContext* context); 41 int32_t OnGetVoucherFile(ppapi::host::HostMessageContext* context);
36 42
37 void DidCreateFileRefHosts( 43 void DidCreateFileRefHosts(
38 const ppapi::host::ReplyMessageContext& reply_context, 44 const ppapi::host::ReplyMessageContext& reply_context,
39 const base::FilePath& external_path, 45 const base::FilePath& external_path,
40 int renderer_pending_host_id, 46 int renderer_pending_host_id,
41 const std::vector<int>& browser_pending_host_ids); 47 const ppapi::proxy::CompletedBrowserResourceHosts& browser_hosts);
42 48
43 // Non-owning pointer. 49 // Non-owning pointer.
44 content::RendererPpapiHost* renderer_ppapi_host_; 50 content::RendererPpapiHost* renderer_ppapi_host_;
45 51
46 base::WeakPtrFactory<PepperFlashDRMRendererHost> weak_factory_; 52 base::WeakPtrFactory<PepperFlashDRMRendererHost> weak_factory_;
47 53
48 DISALLOW_COPY_AND_ASSIGN(PepperFlashDRMRendererHost); 54 DISALLOW_COPY_AND_ASSIGN(PepperFlashDRMRendererHost);
49 }; 55 };
50 56
51 #endif // CHROME_RENDERER_PEPPER_PEPPER_FLASH_DRM_RENDERER_HOST_H_ 57 #endif // CHROME_RENDERER_PEPPER_PEPPER_FLASH_DRM_RENDERER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/pepper/pepper_flash_drm_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698