Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: content/browser/message_port_provider.cc

Issue 986553004: Hold messages in message port service when a message port is (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address hush nit Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « android_webview/native/aw_message_port_service_impl.cc ('k') | content/public/browser/message_port_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698