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/service_worker/embedded_worker_instance.cc

Issue 2422793002: HTML MessagePort as mojo::MessagePipeHandle (Closed)
Patch Set: Cleanup Created 3 years, 11 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 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 DCHECK(process_handle_); 862 DCHECK(process_handle_);
863 return process_handle_->is_new_process(); 863 return process_handle_->is_new_process();
864 } 864 }
865 865
866 int EmbeddedWorkerInstance::worker_devtools_agent_route_id() const { 866 int EmbeddedWorkerInstance::worker_devtools_agent_route_id() const {
867 if (devtools_proxy_) 867 if (devtools_proxy_)
868 return devtools_proxy_->agent_route_id(); 868 return devtools_proxy_->agent_route_id();
869 return MSG_ROUTING_NONE; 869 return MSG_ROUTING_NONE;
870 } 870 }
871 871
872 MessagePortMessageFilter* EmbeddedWorkerInstance::message_port_message_filter()
873 const {
874 return registry_->MessagePortMessageFilterForProcess(process_id());
875 }
876
877 void EmbeddedWorkerInstance::AddListener(Listener* listener) { 872 void EmbeddedWorkerInstance::AddListener(Listener* listener) {
878 listener_list_.AddObserver(listener); 873 listener_list_.AddObserver(listener);
879 } 874 }
880 875
881 void EmbeddedWorkerInstance::RemoveListener(Listener* listener) { 876 void EmbeddedWorkerInstance::RemoveListener(Listener* listener) {
882 listener_list_.RemoveObserver(listener); 877 listener_list_.RemoveObserver(listener);
883 } 878 }
884 879
885 void EmbeddedWorkerInstance::OnNetworkAccessedForScriptLoad() { 880 void EmbeddedWorkerInstance::OnNetworkAccessedForScriptLoad() {
886 starting_phase_ = SCRIPT_DOWNLOADING; 881 starting_phase_ = SCRIPT_DOWNLOADING;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 case SCRIPT_READ_FINISHED: 966 case SCRIPT_READ_FINISHED:
972 return "Script read finished"; 967 return "Script read finished";
973 case STARTING_PHASE_MAX_VALUE: 968 case STARTING_PHASE_MAX_VALUE:
974 NOTREACHED(); 969 NOTREACHED();
975 } 970 }
976 NOTREACHED() << phase; 971 NOTREACHED() << phase;
977 return std::string(); 972 return std::string();
978 } 973 }
979 974
980 } // namespace content 975 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698