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

Side by Side Diff: content/browser/service_worker/embedded_worker_instance.cc

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Address feedback from yusuf Created 3 years, 10 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 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/service_worker/embedded_worker_instance.h" 5 #include "content/browser/service_worker/embedded_worker_instance.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 DCHECK(process_handle_); 810 DCHECK(process_handle_);
811 return process_handle_->is_new_process(); 811 return process_handle_->is_new_process();
812 } 812 }
813 813
814 int EmbeddedWorkerInstance::worker_devtools_agent_route_id() const { 814 int EmbeddedWorkerInstance::worker_devtools_agent_route_id() const {
815 if (devtools_proxy_) 815 if (devtools_proxy_)
816 return devtools_proxy_->agent_route_id(); 816 return devtools_proxy_->agent_route_id();
817 return MSG_ROUTING_NONE; 817 return MSG_ROUTING_NONE;
818 } 818 }
819 819
820 MessagePortMessageFilter* EmbeddedWorkerInstance::message_port_message_filter()
821 const {
822 return registry_->MessagePortMessageFilterForProcess(process_id());
823 }
824
825 void EmbeddedWorkerInstance::AddListener(Listener* listener) { 820 void EmbeddedWorkerInstance::AddListener(Listener* listener) {
826 listener_list_.AddObserver(listener); 821 listener_list_.AddObserver(listener);
827 } 822 }
828 823
829 void EmbeddedWorkerInstance::RemoveListener(Listener* listener) { 824 void EmbeddedWorkerInstance::RemoveListener(Listener* listener) {
830 listener_list_.RemoveObserver(listener); 825 listener_list_.RemoveObserver(listener);
831 } 826 }
832 827
833 void EmbeddedWorkerInstance::OnNetworkAccessedForScriptLoad() { 828 void EmbeddedWorkerInstance::OnNetworkAccessedForScriptLoad() {
834 starting_phase_ = SCRIPT_DOWNLOADING; 829 starting_phase_ = SCRIPT_DOWNLOADING;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 case SCRIPT_READ_FINISHED: 915 case SCRIPT_READ_FINISHED:
921 return "Script read finished"; 916 return "Script read finished";
922 case STARTING_PHASE_MAX_VALUE: 917 case STARTING_PHASE_MAX_VALUE:
923 NOTREACHED(); 918 NOTREACHED();
924 } 919 }
925 NOTREACHED() << phase; 920 NOTREACHED() << phase;
926 return std::string(); 921 return std::string();
927 } 922 }
928 923
929 } // namespace content 924 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698