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

Side by Side Diff: chrome/browser/extensions/api/messaging/extension_message_port.h

Issue 10818013: Native Messaging! (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nit Created 8 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/messaging/extension_message_port.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MESSAGING_EXTENSION_MESSAGE_PORT_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_EXTENSION_MESSAGE_PORT_H_
7
8 #include "chrome/browser/extensions/api/messaging/message_service.h"
9
10 namespace content {
11 class RenderProcessHost;
12 } // namespace content
13
14 namespace extensions {
15
16 // A port that manages communication with an extension.
17 class ExtensionMessagePort : public MessageService::MessagePort {
18 public:
19 ExtensionMessagePort(content::RenderProcessHost* process,
20 int routing_id,
21 const std::string& extension_id);
22 virtual void DispatchOnConnect(
23 int dest_port_id,
24 const std::string& channel_name,
25 const std::string& tab_json,
26 const std::string& source_extension_id,
27 const std::string& target_extension_id) OVERRIDE;
28 virtual void DispatchOnDisconnect(int source_port_id,
29 bool connection_error) OVERRIDE;
30 virtual void DispatchOnMessage(const std::string& message,
31 int target_port_id) OVERRIDE;
32 virtual void IncrementLazyKeepaliveCount() OVERRIDE;
33 virtual void DecrementLazyKeepaliveCount() OVERRIDE;
34 virtual content::RenderProcessHost* GetRenderProcessHost() OVERRIDE;
35
36 private:
37 content::RenderProcessHost* process_;
38 int routing_id_;
39 std::string extension_id_;
40 void* background_host_ptr_; // used in IncrementLazyKeepaliveCount
41 };
42
43 } // namespace extensions
44
45 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_EXTENSION_MESSAGE_PORT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/messaging/extension_message_port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698