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

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

Issue 22532011: Pass handle of the native view window to the native messaging host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Called on the UI thread. 45 // Called on the UI thread.
46 virtual void PostMessageFromNativeProcess(int port_id, 46 virtual void PostMessageFromNativeProcess(int port_id,
47 const std::string& message) = 0; 47 const std::string& message) = 0;
48 virtual void CloseChannel(int port_id, 48 virtual void CloseChannel(int port_id,
49 const std::string& error_message) = 0; 49 const std::string& error_message) = 0;
50 }; 50 };
51 51
52 virtual ~NativeMessageProcessHost(); 52 virtual ~NativeMessageProcessHost();
53 53
54 static scoped_ptr<NativeMessageProcessHost> Create( 54 static scoped_ptr<NativeMessageProcessHost> Create(
55 int source_process_id,
56 int source_routing_id,
55 base::WeakPtr<Client> weak_client_ui, 57 base::WeakPtr<Client> weak_client_ui,
56 const std::string& source_extension_id, 58 const std::string& source_extension_id,
57 const std::string& native_host_name, 59 const std::string& native_host_name,
58 int destination_port); 60 int destination_port);
59 61
60 // Create using specified |launcher|. Used in tests. 62 // Create using specified |launcher|. Used in tests.
61 static scoped_ptr<NativeMessageProcessHost> CreateWithLauncher( 63 static scoped_ptr<NativeMessageProcessHost> CreateWithLauncher(
62 base::WeakPtr<Client> weak_client_ui, 64 base::WeakPtr<Client> weak_client_ui,
63 const std::string& source_extension_id, 65 const std::string& source_extension_id,
64 const std::string& native_host_name, 66 const std::string& native_host_name,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 162
161 // Set to true when a write is pending. 163 // Set to true when a write is pending.
162 bool write_pending_; 164 bool write_pending_;
163 165
164 DISALLOW_COPY_AND_ASSIGN(NativeMessageProcessHost); 166 DISALLOW_COPY_AND_ASSIGN(NativeMessageProcessHost);
165 }; 167 };
166 168
167 } // namespace extensions 169 } // namespace extensions
168 170
169 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H _ 171 #endif // CHROME_BROWSER_EXTENSIONS_API_MESSAGING_NATIVE_MESSAGE_PROCESS_HOST_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698