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

Unified Diff: remoting/host/plugin/host_script_object.h

Issue 9316078: Added daemon process NPAPI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Separated out Start/SetPin and added return codes to Stop and Start. Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/plugin/host_script_object.h
diff --git a/remoting/host/plugin/host_script_object.h b/remoting/host/plugin/host_script_object.h
index 83e7fcfbb8bf9291f537287d8c5229e39c444ffc..b72df5176af11092fa18629281394786d9f0767a 100644
--- a/remoting/host/plugin/host_script_object.h
+++ b/remoting/host/plugin/host_script_object.h
@@ -31,6 +31,7 @@
namespace remoting {
class ChromotingHost;
+class DaemonController;
class DesktopEnvironment;
class It2MeHostUserInterface;
class MutableHostConfig;
@@ -106,6 +107,21 @@ class HostNPScriptObject : public HostStatusObserver {
// No result.
bool Localize(const NPVariant* args, uint32_t argCount, NPVariant* result);
+ // Set the PIN for Me2Me. Args are:
+ // string pin
+ // Returns true if the PIN was updated successfully.
+ bool SetDaemonPin(const NPVariant* args, uint32_t argCount,
+ NPVariant* result);
+
+ // Start the daemon process or change the PIN if it is running. No args.
+ // Returns true if the download/start mechanism was initiated successfully
+ // (poll daemonState to wait for completion) or false if an error occurred.
+ bool StartDaemon(const NPVariant* args, uint32_t argCount, NPVariant* result);
+
+ // Start the daemon process or change the PIN if it is running. No arguments.
+ // Returns true if the daemon was stopped successfully or false on error.
+ bool StopDaemon(const NPVariant* args, uint32_t argCount, NPVariant* result);
+
// Updates state of the host. Can be called only on the main thread.
void SetState(State state);
@@ -192,6 +208,8 @@ class HostNPScriptObject : public HostStatusObserver {
UiStrings ui_strings_;
base::Lock ui_strings_lock_;
+ scoped_ptr<DaemonController> daemon_controller_;
+
base::WaitableEvent disconnected_event_;
// True if we're in the middle of handling a log message.

Powered by Google App Engine
This is Rietveld 408576698