| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/worker/webworkerclient_proxy.h" | 5 #include "chrome/worker/webworkerclient_proxy.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/common/child_process.h" | 8 #include "chrome/common/child_process.h" |
| 9 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
| 10 #include "chrome/common/ipc_logging.h" | 10 #include "chrome/common/ipc_logging.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 } | 91 } |
| 92 | 92 |
| 93 void WebWorkerClientProxy::postConsoleMessageToWorkerObject( | 93 void WebWorkerClientProxy::postConsoleMessageToWorkerObject( |
| 94 int destination, | 94 int destination, |
| 95 int source, | 95 int source, |
| 96 int type, | 96 int type, |
| 97 int level, | 97 int level, |
| 98 const WebString& message, | 98 const WebString& message, |
| 99 int line_number, | 99 int line_number, |
| 100 const WebString& source_url) { | 100 const WebString& source_url) { |
| 101 Send(new WorkerHostMsg_PostConsoleMessageToWorkerObject( | 101 WorkerHostMsg_PostConsoleMessageToWorkerObject_Params params; |
| 102 route_id_, destination, source, type, level, | 102 params.destination_identifier = destination; |
| 103 message, line_number, source_url)); | 103 params.source_identifier = source; |
| 104 params.message_type = type; |
| 105 params.message_level = level; |
| 106 params.message = message; |
| 107 params.line_number = line_number; |
| 108 params.source_url = source_url; |
| 109 Send(new WorkerHostMsg_PostConsoleMessageToWorkerObject(route_id_, params)); |
| 104 } | 110 } |
| 105 | 111 |
| 106 void WebWorkerClientProxy::confirmMessageFromWorkerObject( | 112 void WebWorkerClientProxy::confirmMessageFromWorkerObject( |
| 107 bool has_pending_activity) { | 113 bool has_pending_activity) { |
| 108 Send(new WorkerHostMsg_ConfirmMessageFromWorkerObject( | 114 Send(new WorkerHostMsg_ConfirmMessageFromWorkerObject( |
| 109 route_id_, has_pending_activity)); | 115 route_id_, has_pending_activity)); |
| 110 } | 116 } |
| 111 | 117 |
| 112 void WebWorkerClientProxy::reportPendingActivity(bool has_pending_activity) { | 118 void WebWorkerClientProxy::reportPendingActivity(bool has_pending_activity) { |
| 113 Send(new WorkerHostMsg_ReportPendingActivity( | 119 Send(new WorkerHostMsg_ReportPendingActivity( |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 switches::kWebWorkerShareProcesses)) { | 159 switches::kWebWorkerShareProcesses)) { |
| 154 // Can't kill the process since there could be workers from other | 160 // Can't kill the process since there could be workers from other |
| 155 // renderer process. | 161 // renderer process. |
| 156 NOTIMPLEMENTED(); | 162 NOTIMPLEMENTED(); |
| 157 return; | 163 return; |
| 158 } | 164 } |
| 159 | 165 |
| 160 MessageLoop::current()->PostDelayedTask(FROM_HERE, | 166 MessageLoop::current()->PostDelayedTask(FROM_HERE, |
| 161 new KillProcessTask(this), kMaxTimeForRunawayWorkerMs); | 167 new KillProcessTask(this), kMaxTimeForRunawayWorkerMs); |
| 162 } | 168 } |
| OLD | NEW |