OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PLATFORM_VERIFICATION_MESSAGE
_FILTER_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PLATFORM_VERIFICATION_MESSAGE
_FILTER_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PLATFORM_VERIFICATION_MESSAGE
_FILTER_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PLATFORM_VERIFICATION_MESSAGE
_FILTER_H_ |
7 | 7 |
8 #include "chrome/browser/chromeos/attestation/platform_verification_flow.h" | 8 #include "chrome/browser/chromeos/attestation/platform_verification_flow.h" |
9 #include "ppapi/c/pp_instance.h" | 9 #include "ppapi/c/pp_instance.h" |
10 #include "ppapi/host/resource_message_filter.h" | 10 #include "ppapi/host/resource_message_filter.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 : public ppapi::host::ResourceMessageFilter { | 26 : public ppapi::host::ResourceMessageFilter { |
27 public: | 27 public: |
28 PepperPlatformVerificationMessageFilter(content::BrowserPpapiHost* host, | 28 PepperPlatformVerificationMessageFilter(content::BrowserPpapiHost* host, |
29 PP_Instance instance); | 29 PP_Instance instance); |
30 | 30 |
31 private: | 31 private: |
32 virtual ~PepperPlatformVerificationMessageFilter(); | 32 virtual ~PepperPlatformVerificationMessageFilter(); |
33 | 33 |
34 // ppapi::host::ResourceMessageFilter overrides. | 34 // ppapi::host::ResourceMessageFilter overrides. |
35 virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( | 35 virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( |
36 const IPC::Message& message) OVERRIDE; | 36 const IPC::Message& message) override; |
37 virtual int32_t OnResourceMessageReceived( | 37 virtual int32_t OnResourceMessageReceived( |
38 const IPC::Message& msg, | 38 const IPC::Message& msg, |
39 ppapi::host::HostMessageContext* context) OVERRIDE; | 39 ppapi::host::HostMessageContext* context) override; |
40 | 40 |
41 int32_t OnChallengePlatform(ppapi::host::HostMessageContext* context, | 41 int32_t OnChallengePlatform(ppapi::host::HostMessageContext* context, |
42 const std::string& service_id, | 42 const std::string& service_id, |
43 const std::vector<uint8_t>& challenge); | 43 const std::vector<uint8_t>& challenge); |
44 | 44 |
45 // PlatformVerificationFlow callbacks. | 45 // PlatformVerificationFlow callbacks. |
46 void ChallengePlatformCallback( | 46 void ChallengePlatformCallback( |
47 ppapi::host::ReplyMessageContext reply_context, | 47 ppapi::host::ReplyMessageContext reply_context, |
48 chromeos::attestation::PlatformVerificationFlow::Result challenge_result, | 48 chromeos::attestation::PlatformVerificationFlow::Result challenge_result, |
49 const std::string& signed_data, | 49 const std::string& signed_data, |
50 const std::string& signature, | 50 const std::string& signature, |
51 const std::string& platform_key_certificate); | 51 const std::string& platform_key_certificate); |
52 | 52 |
53 // Used to lookup the WebContents associated with this PP_Instance. | 53 // Used to lookup the WebContents associated with this PP_Instance. |
54 int render_process_id_; | 54 int render_process_id_; |
55 int render_frame_id_; | 55 int render_frame_id_; |
56 | 56 |
57 // Must only be accessed on the UI thread. | 57 // Must only be accessed on the UI thread. |
58 scoped_refptr<chromeos::attestation::PlatformVerificationFlow> pv_; | 58 scoped_refptr<chromeos::attestation::PlatformVerificationFlow> pv_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(PepperPlatformVerificationMessageFilter); | 60 DISALLOW_COPY_AND_ASSIGN(PepperPlatformVerificationMessageFilter); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace chrome | 63 } // namespace chrome |
64 | 64 |
65 #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PLATFORM_VERIFICATION_MESS
AGE_FILTER_H_ | 65 #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PLATFORM_VERIFICATION_MESS
AGE_FILTER_H_ |
OLD | NEW |