blob: 902545f5243659dd19ee60cfa4f1db9dd0a56b5a (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
// Copyright (c) 2013 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 CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_DRM_HOST_H_
#define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_DRM_HOST_H_
#include <string>
#include "base/memory/weak_ptr.h"
#include "chrome/browser/renderer_host/pepper/device_id_fetcher.h"
#include "ppapi/host/host_message_context.h"
#include "ppapi/host/resource_host.h"
namespace content {
class BrowserPpapiHost;
}
namespace IPC {
class Message;
}
namespace chrome {
class MonitorFinder;
class PepperFlashDRMHost : public ppapi::host::ResourceHost {
public:
PepperFlashDRMHost(content::BrowserPpapiHost* host,
PP_Instance instance,
PP_Resource resource);
~PepperFlashDRMHost() override;
// ResourceHost override.
int32_t OnResourceMessageReceived(
const IPC::Message& msg,
ppapi::host::HostMessageContext* context) override;
private:
// IPC message handler.
int32_t OnHostMsgGetDeviceID(ppapi::host::HostMessageContext* context);
int32_t OnHostMsgGetHmonitor(ppapi::host::HostMessageContext* context);
int32_t OnHostMsgMonitorIsExternal(ppapi::host::HostMessageContext* context);
// Called by the fetcher when the device ID was retrieved, or the empty string
// on error.
void GotDeviceID(ppapi::host::ReplyMessageContext reply_context,
const std::string& id,
int32_t result);
scoped_refptr<DeviceIDFetcher> fetcher_;
scoped_refptr<MonitorFinder> monitor_finder_;
base::WeakPtrFactory<PepperFlashDRMHost> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(PepperFlashDRMHost);
};
} // namespace chrome
#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_DRM_HOST_H_
|