OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
dmichael (off chromium)
2015/02/09 22:26:59
s/2014/2015
...and in other new files, too.
Justin Chuang
2015/02/10 16:01:02
Done. Only change new files.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_IMAGE_CAPTURE_HOST_H_ | |
6 #define CONTENT_RENDERER_PEPPER_PEPPER_IMAGE_CAPTURE_HOST_H_ | |
7 | |
8 #include "base/memory/scoped_ptr.h" | |
9 #include "content/public/renderer/renderer_ppapi_host.h" | |
10 #include "content/renderer/pepper/ppb_buffer_impl.h" | |
11 #include "ppapi/c/pp_size.h" | |
12 #include "ppapi/host/host_message_context.h" | |
13 #include "ppapi/host/resource_host.h" | |
14 | |
15 namespace content { | |
16 class PepperPlatformImageCapture; | |
17 class RendererPpapiHostImpl; | |
18 | |
19 class PepperImageCaptureHost : public ppapi::host::ResourceHost { | |
20 public: | |
21 PepperImageCaptureHost(RendererPpapiHostImpl* host, | |
22 PP_Instance instance, | |
23 PP_Resource resource); | |
24 | |
25 ~PepperImageCaptureHost() override; | |
26 | |
27 bool Init(); | |
28 | |
29 int32_t OnResourceMessageReceived( | |
30 const IPC::Message& msg, | |
31 ppapi::host::HostMessageContext* context) override; | |
32 | |
33 // These methods are called by PepperPlatformImageCapture only. | |
34 | |
35 // Called when image capture is initialized. | |
36 void OnInitialized(bool succeeded); | |
37 | |
38 // Called when the preview frame sizes are enumerated. | |
39 void OnPreviewSizesEnumerated(const std::vector<PP_Size>& sizes); | |
40 | |
41 private: | |
42 // Plugin -> host message handlers. | |
43 | |
dmichael (off chromium)
2015/02/09 22:26:59
nit: Please remove the extra carriage return
Justin Chuang
2015/02/10 16:01:02
Done.
| |
44 int32_t OnOpen(ppapi::host::HostMessageContext* context, | |
45 const std::string& device_id); | |
46 int32_t OnClose(ppapi::host::HostMessageContext* context); | |
47 int32_t OnGetSupportedPreviewSizes(ppapi::host::HostMessageContext* context); | |
48 | |
49 // Utility methods. | |
50 | |
dmichael (off chromium)
2015/02/09 22:26:59
ditto
Justin Chuang
2015/02/10 16:01:02
Done.
| |
51 void DetachPlatformImageCapture(); | |
52 | |
53 scoped_ptr<PepperPlatformImageCapture> platform_image_capture_; | |
54 | |
55 RendererPpapiHostImpl* renderer_ppapi_host_; | |
56 | |
57 ppapi::host::ReplyMessageContext open_reply_context_; | |
58 | |
59 ppapi::host::ReplyMessageContext preview_sizes_reply_context_; | |
60 | |
61 DISALLOW_COPY_AND_ASSIGN(PepperImageCaptureHost); | |
62 }; | |
63 | |
64 } // namespace content | |
65 | |
66 #endif // CONTENT_RENDERER_PEPPER_PEPPER_IMAGE_CAPTURE_HOST_H_ | |
OLD | NEW |