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

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

Issue 558403002: Remote Assistance on Chrome OS Part II - Native Messaging renaming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | remoting/host/DEPS » ('j') | remoting/host/it2me/it2me_native_messaging_host.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 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_NATIVE_MESSAGING_CHANNEL_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_CHANNEL_H_
7
8 #include "base/callback.h"
9
10 namespace base {
11 class DictionaryValue;
12 class Value;
13 } // namespace base
14
15 namespace extensions {
16
17 // Defines an interface to read messages and send responses between the native
18 // process and chrome.
19 class NativeMessagingChannel {
20 public:
21 // Used to send a message to the other endpoint.
22 typedef base::Callback<void(scoped_ptr<base::DictionaryValue> message)>
23 SendMessageCallback;
24
25 virtual ~NativeMessagingChannel() {}
26
27 // Starts reading and processing messages.
28 // |received_message| is called whenever a message is received from the other
29 // endpoint.
30 // |quit_closure| is called by the channel to shut down the native process
31 // whenever it encounter failures in sending or receiving a message.
32 virtual void Start(const SendMessageCallback& received_message,
33 const base::Closure& quit_closure) = 0;
34
35 // Sends a message to the other endpoint.
36 virtual void SendMessage(scoped_ptr<base::DictionaryValue> message) = 0;
37 };
38
39 } // namespace extensions
40
41 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGING_CHANNEL_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/DEPS » ('j') | remoting/host/it2me/it2me_native_messaging_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698