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 : BrowserMessageFilter(WebRTCIdentityMsgStart), | 19 : renderer_process_id_(renderer_process_id), |
20 renderer_process_id_(renderer_process_id), | |
21 identity_store_(identity_store), | 20 identity_store_(identity_store), |
22 weak_factory_(this) {} | 21 weak_factory_(this) {} |
23 | 22 |
24 WebRTCIdentityServiceHost::~WebRTCIdentityServiceHost() { | 23 WebRTCIdentityServiceHost::~WebRTCIdentityServiceHost() { |
25 if (!cancel_callback_.is_null()) | 24 if (!cancel_callback_.is_null()) |
26 cancel_callback_.Run(); | 25 cancel_callback_.Run(); |
27 } | 26 } |
28 | 27 |
29 bool WebRTCIdentityServiceHost::OnMessageReceived(const IPC::Message& message, | 28 bool WebRTCIdentityServiceHost::OnMessageReceived(const IPC::Message& message, |
30 bool* message_was_ok) { | 29 bool* message_was_ok) { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 SendErrorMessage(sequence_number, status); | 87 SendErrorMessage(sequence_number, status); |
89 } | 88 } |
90 } | 89 } |
91 | 90 |
92 void WebRTCIdentityServiceHost::SendErrorMessage(int sequence_number, | 91 void WebRTCIdentityServiceHost::SendErrorMessage(int sequence_number, |
93 int error) { | 92 int error) { |
94 Send(new WebRTCIdentityHostMsg_RequestFailed(sequence_number, error)); | 93 Send(new WebRTCIdentityHostMsg_RequestFailed(sequence_number, error)); |
95 } | 94 } |
96 | 95 |
97 } // namespace content | 96 } // namespace content |
OLD | NEW |