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

Side by Side Diff: chromeos/ime/ibus_daemon_controller.h

Issue 12041006: Introduce empty IBusDaemonController class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use thread_checker Created 7 years, 11 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
« no previous file with comments | « chromeos/chromeos.gyp ('k') | chromeos/ime/ibus_daemon_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROMEOS_IME_IBUS_DAEMON_CONTROLLER_H_
6 #define CHROMEOS_IME_IBUS_DAEMON_CONTROLLER_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/sequenced_task_runner.h"
10 #include "chromeos/chromeos_export.h"
11
12 namespace chromeos {
13
14 // IBusDaemonController is used to start/stop ibus-daemon process. This class is
15 // also watching ibus-daemon process and if it is crashed, re-launch it
16 // automatically. This class is managed as Singleton.
17 class CHROMEOS_EXPORT IBusDaemonController {
18 public:
19 class Observer {
20 public:
21 // Called when the connection with ibus-daemon is established.
22 virtual void OnConnected() = 0;
23
24 // Called when the connection with ibus-daemon is lost.
25 virtual void OnDisconnected() = 0;
26 };
27
28 virtual ~IBusDaemonController();
29
30 // Initializes IBusDaemonController. ibus-daemon related file handling is
31 // posted to |file_task_runner|.
32 virtual void Initialize(
33 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner,
34 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner) = 0;
35
36 virtual void AddObserver(Observer* observer) = 0;
37 virtual void RemoveObserver(Observer* observer) = 0;
38
39 // Starts ibus-daemon.
40 virtual bool Start() = 0;
41
42 // Stops ibus-daemon.
43 virtual bool Stop() = 0;
44
45 // Returns actual implementation of IBusDaemonController. If the browser is
46 // not running on the Chrome OS device, this function returns stub
47 // implementation.
48 static CHROMEOS_EXPORT IBusDaemonController* GetInstance();
49
50 protected:
51 // IBusDaemonController is managed as singleton. USe GetInstance instead.
52 IBusDaemonController();
53
54 DISALLOW_COPY_AND_ASSIGN(IBusDaemonController);
55 };
56
57 } // namespace chromeos
58
59 #endif // CHROMEOS_IME_IBUS_DAEMON_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chromeos/chromeos.gyp ('k') | chromeos/ime/ibus_daemon_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698