OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/devtools/worker_devtools_message_filter.h" | 5 #include "content/browser/devtools/worker_devtools_message_filter.h" |
6 | 6 |
7 #include "content/browser/devtools/worker_devtools_manager.h" | 7 #include "content/browser/devtools/worker_devtools_manager.h" |
8 #include "content/common/devtools_messages.h" | 8 #include "content/common/devtools_messages.h" |
9 #include "content/common/worker_messages.h" | 9 #include "content/common/worker_messages.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 WorkerDevToolsMessageFilter::WorkerDevToolsMessageFilter( | 13 WorkerDevToolsMessageFilter::WorkerDevToolsMessageFilter( |
14 int worker_process_host_id) | 14 int worker_process_host_id) |
15 : BrowserMessageFilter(DevToolsMsgStart), | 15 : worker_process_host_id_(worker_process_host_id), |
16 worker_process_host_id_(worker_process_host_id), | |
17 current_routing_id_(0) { | 16 current_routing_id_(0) { |
18 } | 17 } |
19 | 18 |
20 WorkerDevToolsMessageFilter::~WorkerDevToolsMessageFilter() { | 19 WorkerDevToolsMessageFilter::~WorkerDevToolsMessageFilter() { |
21 } | 20 } |
22 | 21 |
23 bool WorkerDevToolsMessageFilter::OnMessageReceived( | 22 bool WorkerDevToolsMessageFilter::OnMessageReceived( |
24 const IPC::Message& message, | 23 const IPC::Message& message, |
25 bool* message_was_ok) { | 24 bool* message_was_ok) { |
26 bool handled = true; | 25 bool handled = true; |
(...skipping 15 matching lines...) Expand all Loading... |
42 worker_process_host_id_, current_routing_id_, message); | 41 worker_process_host_id_, current_routing_id_, message); |
43 } | 42 } |
44 | 43 |
45 void WorkerDevToolsMessageFilter::OnSaveAgentRumtimeState( | 44 void WorkerDevToolsMessageFilter::OnSaveAgentRumtimeState( |
46 const std::string& state) { | 45 const std::string& state) { |
47 WorkerDevToolsManager::GetInstance()->SaveAgentRuntimeState( | 46 WorkerDevToolsManager::GetInstance()->SaveAgentRuntimeState( |
48 worker_process_host_id_, current_routing_id_, state); | 47 worker_process_host_id_, current_routing_id_, state); |
49 } | 48 } |
50 | 49 |
51 } // namespace content | 50 } // namespace content |
OLD | NEW |