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

Side by Side Diff: remoting/host/plugin/daemon_npapi.h

Issue 9316078: Added daemon process NPAPI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unused headers. Fixed Windows and Mac builds. 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 unified diff | Download patch | Annotate | Revision Log
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 REMOTING_DAEMON_NPAPI_H_
Sergey Ulanov 2012/02/02 23:41:24 nit: REMOTING_HOST_PLUGIN_DAEMONG_NPAPI_H_
Jamie 2012/02/03 00:47:41 Done.
6 #define REMOTING_DAEMON_NPAPI_H_
7
8 namespace remoting {
9
10 class DaemonNpapi {
Sergey Ulanov 2012/02/02 23:41:24 Not sure if this is a right name for this class -
Jamie 2012/02/03 00:47:41 Done.
Wez 2012/02/03 01:25:36 Agreed.
11 public:
12 virtual ~DaemonNpapi() {}
13
14 enum State {
Sergey Ulanov 2012/02/02 23:41:24 nit: This should be declared before the constructo
Jamie 2012/02/03 00:47:41 I think it's clearer placed next to where it's use
15 // The daemon process is not installed. This is functionally equivalent
16 // to STATE_STOPPED, but the start method is expected to be significantly
17 // slower, and might involve user interaction. It might be appropriate to
18 // indicate this in the UI.
19 STATE_NOT_INSTALLED = 0,
Wez 2012/02/03 01:25:36 nit: Do we need explicit values for each enum valu
Jamie 2012/02/03 01:40:15 When the JS side of this is implemented, we'll nee
20 // The daemon process is installed but not running. Call Start to start it.
21 STATE_STOPPED = 1,
22 // The daemon process is running. Call Start again to change the PIN or
23 // Stop to stop it.
24 STATE_STARTED = 2,
25 // The previous Start operation failed. This is functionally equivalent
26 // to STATE_STOPPED, but the UI should report an error in this state.
27 // This state should not persist across restarts of the NPAPI process.
28 STATE_START_FAILED = 3
Wez 2012/02/03 01:25:36 Perhaps have a STATE_NOT_IMPLEMENTED for now, for
Jamie 2012/02/03 01:40:15 Good idea. Done.
29 };
30
31 // Return the state of the daemon process.
32 virtual State GetState() = 0;
33
34 // Start the daemon process and set the PIN, which should be expressed as a
35 // UTF8-encoded string. Since this may require that the daemon be downloaded
36 // and installed, this may take a long time--poll GetState until the state is
37 // STATE_STARTED or STATE_START_FAILED.
38 //
39 // Calling Start when the daemon is already running changes the PIN.
40 virtual void Start(const char* pin) = 0;
alexeypa (please no reviews) 2012/02/03 00:26:05 nit: typically it is pretty bad idea to pass a str
Jamie 2012/02/03 00:47:41 Both seem reasonably common in Chrome. I prefer co
Sergey Ulanov 2012/02/03 01:08:24 Chromoting uses string class in most cases, and I
Wez 2012/02/03 01:25:36 Why do we want to set the PIN when we start the Da
Wez 2012/02/03 01:25:36 Surely wrapping it as std::string doesn't help - i
Jamie 2012/02/03 01:40:15 According to the latest mocks, you can't start the
41
42 // Stop the daemon process. It is permitted to call Stop while the daemon
43 // process is being installed, in which case the installation should be
44 // aborted if possible; if not then it is sufficient to ensure that the
45 // daemon process is not started automatically upon successful installation.
46 virtual void Stop() = 0;
47
48 static DaemonNpapi* Create();
49 };
50
51 } // namespace remoting
52
53 #endif
Sergey Ulanov 2012/02/02 23:41:24 nit: // REMOTING_...
Jamie 2012/02/03 00:47:41 Done.
OLDNEW
« no previous file with comments | « no previous file | remoting/host/plugin/daemon_npapi_linux.cc » ('j') | remoting/host/plugin/daemon_npapi_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698