| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/public/browser/message_port_provider.h" | 5 #include "content/public/browser/message_port_provider.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "content/browser/browser_thread_impl.h" | 8 #include "content/browser/browser_thread_impl.h" |
| 9 #include "content/browser/message_port_message_filter.h" | 9 #include "content/browser/message_port_message_filter.h" |
| 10 #include "content/browser/message_port_service.h" | 10 #include "content/browser/message_port_service.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } | 73 } |
| 74 | 74 |
| 75 // static | 75 // static |
| 76 void MessagePortProvider::ClosePort(int message_port_id) { | 76 void MessagePortProvider::ClosePort(int message_port_id) { |
| 77 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 77 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 78 MessagePortService* msp = MessagePortService::GetInstance(); | 78 MessagePortService* msp = MessagePortService::GetInstance(); |
| 79 msp->ClosePort(message_port_id); | 79 msp->ClosePort(message_port_id); |
| 80 } | 80 } |
| 81 | 81 |
| 82 // static | 82 // static |
| 83 void MessagePortProvider::HoldMessages(int message_port_id) { |
| 84 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 85 MessagePortService* msp = MessagePortService::GetInstance(); |
| 86 msp->HoldMessages(message_port_id); |
| 87 } |
| 88 |
| 89 // static |
| 90 void MessagePortProvider::ReleaseMessages(int message_port_id) { |
| 91 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 92 MessagePortService* msp = MessagePortService::GetInstance(); |
| 93 msp->ReleaseMessages(message_port_id); |
| 94 } |
| 95 |
| 96 // static |
| 83 void MessagePortProvider::OnMessagePortDelegateClosing( | 97 void MessagePortProvider::OnMessagePortDelegateClosing( |
| 84 MessagePortDelegate* delegate) { | 98 MessagePortDelegate* delegate) { |
| 85 MessagePortService::GetInstance()->OnMessagePortDelegateClosing(delegate); | 99 MessagePortService::GetInstance()->OnMessagePortDelegateClosing(delegate); |
| 86 } | 100 } |
| 87 | 101 |
| 88 } // namespace content | 102 } // namespace content |
| OLD | NEW |