OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser/automation/extension_port_container.h" | 5 #include "chrome/browser/automation/extension_port_container.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "chrome/browser/automation/automation_provider.h" | 11 #include "chrome/browser/automation/automation_provider.h" |
12 #include "chrome/browser/automation/extension_automation_constants.h" | 12 #include "chrome/browser/automation/extension_automation_constants.h" |
13 #include "chrome/browser/extensions/extension_message_service.h" | 13 #include "chrome/browser/extensions/extension_message_service.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/renderer_host/render_process_host.h" | 15 #include "chrome/browser/renderer_host/render_process_host.h" |
16 #include "chrome/browser/renderer_host/render_view_host.h" | 16 #include "chrome/browser/renderer_host/render_view_host.h" |
17 #include "chrome/common/automation_messages.h" | 17 #include "chrome/common/automation_messages.h" |
18 #include "chrome/common/notification_service.h" | |
19 #include "chrome/common/render_messages.h" | 18 #include "chrome/common/render_messages.h" |
20 | 19 |
21 // TODO(siggi): Find a more structured way to read and write JSON messages. | 20 // TODO(siggi): Find a more structured way to read and write JSON messages. |
22 | 21 |
23 namespace ext = extension_automation_constants; | 22 namespace ext = extension_automation_constants; |
24 | 23 |
25 ExtensionPortContainer::ExtensionPortContainer(AutomationProvider* automation, | 24 ExtensionPortContainer::ExtensionPortContainer(AutomationProvider* automation, |
26 int tab_handle) : | 25 int tab_handle) : |
27 automation_(automation), service_(NULL), port_id_(-1), | 26 automation_(automation), service_(NULL), port_id_(-1), |
28 tab_handle_(tab_handle) { | 27 tab_handle_(tab_handle) { |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 // This will delete the port and notify the other end of the disconnect. | 250 // This will delete the port and notify the other end of the disconnect. |
252 automation->RemovePortContainer(port); | 251 automation->RemovePortContainer(port); |
253 } | 252 } |
254 } else { | 253 } else { |
255 // We don't expect other messages here. | 254 // We don't expect other messages here. |
256 NOTREACHED(); | 255 NOTREACHED(); |
257 } | 256 } |
258 | 257 |
259 return true; | 258 return true; |
260 } | 259 } |
OLD | NEW |