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 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" | 5 #include "content/browser/renderer_host/media/webrtc_identity_service_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "content/browser/child_process_security_policy_impl.h" | 9 #include "content/browser/child_process_security_policy_impl.h" |
10 #include "content/browser/media/webrtc_identity_store.h" | 10 #include "content/browser/media/webrtc_identity_store.h" |
11 #include "content/common/media/webrtc_identity_messages.h" | 11 #include "content/common/media/webrtc_identity_messages.h" |
12 #include "net/base/net_errors.h" | 12 #include "net/base/net_errors.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 WebRTCIdentityServiceHost::WebRTCIdentityServiceHost( | 16 WebRTCIdentityServiceHost::WebRTCIdentityServiceHost( |
17 int renderer_process_id, | 17 int renderer_process_id, |
18 scoped_refptr<WebRTCIdentityStore> identity_store) | 18 scoped_refptr<WebRTCIdentityStore> identity_store) |
19 : renderer_process_id_(renderer_process_id), | 19 : BrowserMessageFilter(WebRTCIdentityMsgStart), |
| 20 renderer_process_id_(renderer_process_id), |
20 identity_store_(identity_store), | 21 identity_store_(identity_store), |
21 weak_factory_(this) {} | 22 weak_factory_(this) {} |
22 | 23 |
23 WebRTCIdentityServiceHost::~WebRTCIdentityServiceHost() { | 24 WebRTCIdentityServiceHost::~WebRTCIdentityServiceHost() { |
24 if (!cancel_callback_.is_null()) | 25 if (!cancel_callback_.is_null()) |
25 cancel_callback_.Run(); | 26 cancel_callback_.Run(); |
26 } | 27 } |
27 | 28 |
28 bool WebRTCIdentityServiceHost::OnMessageReceived(const IPC::Message& message, | 29 bool WebRTCIdentityServiceHost::OnMessageReceived(const IPC::Message& message, |
29 bool* message_was_ok) { | 30 bool* message_was_ok) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 SendErrorMessage(sequence_number, status); | 88 SendErrorMessage(sequence_number, status); |
88 } | 89 } |
89 } | 90 } |
90 | 91 |
91 void WebRTCIdentityServiceHost::SendErrorMessage(int sequence_number, | 92 void WebRTCIdentityServiceHost::SendErrorMessage(int sequence_number, |
92 int error) { | 93 int error) { |
93 Send(new WebRTCIdentityHostMsg_RequestFailed(sequence_number, error)); | 94 Send(new WebRTCIdentityHostMsg_RequestFailed(sequence_number, error)); |
94 } | 95 } |
95 | 96 |
96 } // namespace content | 97 } // namespace content |
OLD | NEW |