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

Side by Side Diff: chrome/browser/extensions/api/native_message/native_message_api.h

Issue 10818013: Native Messaging! (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
(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_NATIVE_MESSAGE_NATIVE_MESSAGE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_NATIVE_MESSAGE_NATIVE_MESSAGE_API_H_
7
8 #include "chrome/browser/extensions/extension_function.h"
9
10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h"
12
13 class NativeThreadDelegate;
14
15 namespace base {
16 class DelegateSimpleThread;
17 class DictionaryValue;
18 } // namespace base
19
20 class SendNativeMessageFunction : public AsyncExtensionFunction {
Matt Perry 2012/07/23 23:47:03 put this in the extensions namespace
21 public:
22 SendNativeMessageFunction();
23 void SendResponseOnUIThread(bool success, scoped_ptr<std::string> error,
24 scoped_ptr<DictionaryValue> result);
25
26 protected:
27 virtual bool RunImpl() OVERRIDE;
28
29 private:
30 virtual ~SendNativeMessageFunction();
31 void JoinThreadOnBackgroundThread();
32
33 scoped_ptr<base::DelegateSimpleThread> thread_;
34 scoped_ptr<NativeThreadDelegate> thread_delegate_;
35
36 DECLARE_EXTENSION_FUNCTION_NAME("extension.sendNativeMessage")
37 };
38
39 #endif // CHROME_BROWSER_EXTENSIONS_API_NATIVE_MESSAGE_NATIVE_MESSAGE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698