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: chrome/browser/automation/extension_port_container.h

Issue 155707: Changed the extension.connect() API not to broadcast to all tabs. Added a (Closed)
Patch Set: review comments Created 11 years, 5 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 (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 #ifndef CHROME_BROWSER_EXTENSION_PORT_CONTAINER_H_ 5 #ifndef CHROME_BROWSER_EXTENSION_PORT_CONTAINER_H_
6 #define CHROME_BROWSER_EXTENSION_PORT_CONTAINER_H_ 6 #define CHROME_BROWSER_EXTENSION_PORT_CONTAINER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/ref_counted.h"
11 #include "chrome/common/ipc_message.h" 12 #include "chrome/common/ipc_message.h"
12 13
13 class AutomationProvider; 14 class AutomationProvider;
14 class ExtensionMessageService; 15 class ExtensionMessageService;
15 class ListValue; 16 class ListValue;
16 class MessageLoop; 17 class MessageLoop;
17 class RenderViewHost; 18 class RenderViewHost;
18 19
19 // This class represents an external port to an extension, opened 20 // This class represents an external port to an extension, opened
20 // through the automation interface. 21 // through the automation interface.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void SendConnectionResponse(int connection_id, int port_id); 60 void SendConnectionResponse(int connection_id, int port_id);
60 61
61 void OnExtensionMessageInvoke(const std::string& function_name, 62 void OnExtensionMessageInvoke(const std::string& function_name,
62 const ListValue& args); 63 const ListValue& args);
63 void OnExtensionHandleMessage(const std::string& message, int source_port_id); 64 void OnExtensionHandleMessage(const std::string& message, int source_port_id);
64 65
65 // Our automation provider. 66 // Our automation provider.
66 AutomationProvider* automation_; 67 AutomationProvider* automation_;
67 68
68 // The extension message service. 69 // The extension message service.
69 ExtensionMessageService* service_; 70 scoped_refptr<ExtensionMessageService> service_;
70 71
71 // Our assigned port id. 72 // Our assigned port id.
72 int port_id_; 73 int port_id_;
73 // Handle to our associated tab. 74 // Handle to our associated tab.
74 int tab_handle_; 75 int tab_handle_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(ExtensionPortContainer); 77 DISALLOW_COPY_AND_ASSIGN(ExtensionPortContainer);
77 }; 78 };
78 79
79 #endif // CHROME_BROWSER_EXTENSION_PORT_CONTAINER_H_ 80 #endif // CHROME_BROWSER_EXTENSION_PORT_CONTAINER_H_
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/automation/extension_port_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698