Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: chrome/browser/extensions/message_service.h

Issue 10818013: Native Messaging! (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Everything is Different! Merged with MessageService Created 8 years, 4 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_EXTENSIONS_MESSAGE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_MESSAGE_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_MESSAGE_SERVICE_H_ 6 #define CHROME_BROWSER_EXTENSIONS_MESSAGE_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 const std::string& channel_name); 71 const std::string& channel_name);
72 72
73 // Same as above, but opens a channel to the tab with the given ID. Messages 73 // Same as above, but opens a channel to the tab with the given ID. Messages
74 // are restricted to that tab, so if there are multiple tabs in that process, 74 // are restricted to that tab, so if there are multiple tabs in that process,
75 // only the targeted tab will receive messages. 75 // only the targeted tab will receive messages.
76 void OpenChannelToTab( 76 void OpenChannelToTab(
77 int source_process_id, int source_routing_id, int receiver_port_id, 77 int source_process_id, int source_routing_id, int receiver_port_id,
78 int tab_id, const std::string& extension_id, 78 int tab_id, const std::string& extension_id,
79 const std::string& channel_name); 79 const std::string& channel_name);
80 80
81 void OpenChannelToNativeApp(
82 int source_process_id, int source_routing_id, int receiver_port_id,
83 const std::string& source_extension_id,
84 const std::string& native_app_name,
85 const std::string& channel_name,
86 const std::string& connect_message);
87 void OpenChannelToNativeAppOnFileThread(
88 int receiver_port_id,
89 const std::string& native_app_name,
90 const std::string& channel_name,
91 const std::string& connect_message,
92 MessageChannel* channel,
93 const std::string& tab_json);
94
81 // Closes the message channel associated with the given port, and notifies 95 // Closes the message channel associated with the given port, and notifies
82 // the other side. 96 // the other side.
83 void CloseChannel(int port_id, bool connection_error); 97 void CloseChannel(int port_id, bool connection_error);
84 98
85 // Sends a message from a renderer to the given port. 99 // Sends a message from a renderer to the given port.
86 void PostMessageFromRenderer(int port_id, const std::string& message); 100 void PostMessageFromRenderer(int port_id, const std::string& message);
87 101
88 private: 102 private:
89 friend class MockMessageService; 103 friend class MockMessageService;
90 struct OpenChannelParams; 104 struct OpenChannelParams;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 157
144 // Weak pointer. Guaranteed to outlive this class. 158 // Weak pointer. Guaranteed to outlive this class.
145 LazyBackgroundTaskQueue* lazy_background_task_queue_; 159 LazyBackgroundTaskQueue* lazy_background_task_queue_;
146 160
147 DISALLOW_COPY_AND_ASSIGN(MessageService); 161 DISALLOW_COPY_AND_ASSIGN(MessageService);
148 }; 162 };
149 163
150 } // namespace extensions 164 } // namespace extensions
151 165
152 #endif // CHROME_BROWSER_EXTENSIONS_MESSAGE_SERVICE_H_ 166 #endif // CHROME_BROWSER_EXTENSIONS_MESSAGE_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/message_service.cc » ('j') | chrome/browser/extensions/message_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698