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

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

Issue 12041006: Introduce empty IBusDaemonController class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/ime/ibus_daemon_controller.h ('k') | no next file » | 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 #include "chromeos/ime/ibus_daemon_controller.h"
6
7 #include "base/chromeos/chromeos_version.h"
8
9 namespace chromeos {
10
11 namespace {
12
13 IBusDaemonController* g_ibus_daemon_controller = NULL;
14
15 // The implementation of IBusDaemonController.
16 class IBusDaemonControllerImpl : public IBusDaemonController {
satorux1 2013/01/22 07:06:01 This class should be used from a single thread, ri
Seigo Nonaka 2013/01/22 10:53:48 Right, use NonThreadSafe for thread checking. On 2
satorux1 2013/01/22 17:09:52 I'd suggest to use ThreadChecker. non_thread_safe.
Seigo Nonaka 2013/01/23 08:06:08 Sorry I missed NonThreadSafe comment. Updated patc
17 public:
18 IBusDaemonControllerImpl() {}
19
20 ~IBusDaemonControllerImpl() {}
21
22 // IBusDaemonController override:
23 void Initialize(
24 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner,
25 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner) {
26 // TODO(nona): Implement this.
27 }
28
29 // IBusDaemonController override:
30 void AddObserver(Observer* observer) {
31 // TODO(nona): Implement this.
32 }
33
34 // IBusDaemonController override:
35 void RemoveObserver(Observer* observer) {
36 // TODO(nona): Implement this.
37 }
38
39 // IBusDaemonController override:
40 bool Start() OVERRIDE {
41 // TODO(nona): Implement this.
42 return true;
43 }
44
45 // IBusDaemonController override:
46 bool Stop() OVERRIDE {
47 // TODO(nona): Implement this.
48 return true;
49 }
50
51 private:
52 DISALLOW_COPY_AND_ASSIGN(IBusDaemonControllerImpl);
53 };
54
55 // The stub implementation of IBusDaemonController.
56 class IBusDaemonControllerStubImpl : public IBusDaemonController {
57 public:
58 IBusDaemonControllerStubImpl() {}
59 virtual ~IBusDaemonControllerStubImpl() {}
60
61 // IBusDaemonController overrides:
62 void Initialize(
63 const scoped_refptr<base::SequencedTaskRunner>& ui_runner,
64 const scoped_refptr<base::SequencedTaskRunner>& file_runner) OVERRIDE {}
65 virtual void AddObserver(Observer* observer) OVERRIDE {}
66 virtual void RemoveObserver(Observer* observer) OVERRIDE {}
67 virtual bool Start() OVERRIDE { return true; }
68 virtual bool Stop() OVERRIDE { return true; }
69
70 private:
71 DISALLOW_COPY_AND_ASSIGN(IBusDaemonControllerStubImpl);
72 };
73
74 } // namespace
75
76 ///////////////////////////////////////////////////////////////////////////////
77 // IBusDaemonController
78
79 IBusDaemonController::IBusDaemonController() {
80 }
81
82 IBusDaemonController::~IBusDaemonController() {
83 }
84
85 IBusDaemonController* IBusDaemonController::GetInstance() {
86 if (!g_ibus_daemon_controller) {
87 if (base::chromeos::IsRunningOnChromeOS()) {
88 g_ibus_daemon_controller = new IBusDaemonControllerImpl();
89 } else {
90 g_ibus_daemon_controller = new IBusDaemonControllerStubImpl();
91 }
92 }
93 return g_ibus_daemon_controller;
94 }
95
96 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/ime/ibus_daemon_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698