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

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

Issue 12221045: Calling IBusBridge::Initialize/Shutdown function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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 CHROMEOS_IME_IBUS_BRIDGE_H_ 5 #ifndef CHROMEOS_IME_IBUS_BRIDGE_H_
6 #define CHROMEOS_IME_IBUS_BRIDGE_H_ 6 #define CHROMEOS_IME_IBUS_BRIDGE_H_
7 7
8 #include <string> 8 #include <string>
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chromeos/chromeos_export.h"
10 11
11 namespace chromeos { 12 namespace chromeos {
12 class IBusInputContextHandlerInterface; 13 class IBusInputContextHandlerInterface;
13 class IBusEngineHandlerInterface; 14 class IBusEngineHandlerInterface;
14 class IBusPanelCandidateWindowHandlerInterface; 15 class IBusPanelCandidateWindowHandlerInterface;
15 class IBusPanelPropertyHandlerInterface; 16 class IBusPanelPropertyHandlerInterface;
16 17
17 // IBusBridge provides access of each IME related handler. This class is used 18 // IBusBridge provides access of each IME related handler. This class is used
18 // for IME implementation without ibus-daemon. The legacy ibus IME communicates 19 // for IME implementation without ibus-daemon. The legacy ibus IME communicates
19 // their engine with dbus protocol, but new implementation doesn't. Instead of 20 // their engine with dbus protocol, but new implementation doesn't. Instead of
20 // dbus communcation, new implementation calls target service(e.g. PanelService 21 // dbus communcation, new implementation calls target service(e.g. PanelService
21 // or EngineService) directly by using this class. 22 // or EngineService) directly by using this class.
22 class IBusBridge { 23 class IBusBridge {
23 public: 24 public:
24 virtual ~IBusBridge(); 25 virtual ~IBusBridge();
25 26
26 // Allocates the global instance. Must be called before any calls to Get(). 27 // Allocates the global instance. Must be called before any calls to Get().
27 static void Initialize(); 28 static CHROMEOS_EXPORT void Initialize();
28 29
29 // Releases the global instance. 30 // Releases the global instance.
30 static void Shutdown(); 31 static CHROMEOS_EXPORT void Shutdown();
31 32
32 // Returns IBusBridge global instance. Initialize() must be called first. 33 // Returns IBusBridge global instance. Initialize() must be called first.
33 static IBusBridge* Get(); 34 static IBusBridge* Get();
34 35
35 // Returns current InputContextHandler. This function returns NULL if input 36 // Returns current InputContextHandler. This function returns NULL if input
36 // context is not ready to use. 37 // context is not ready to use.
37 virtual IBusInputContextHandlerInterface* GetInputContextHandler() const = 0; 38 virtual IBusInputContextHandlerInterface* GetInputContextHandler() const = 0;
38 39
39 // Updates current InputContextHandler. If there is no active input context, 40 // Updates current InputContextHandler. If there is no active input context,
40 // pass NULL for |handler|. Caller must release |handler|. 41 // pass NULL for |handler|. Caller must release |handler|.
(...skipping 29 matching lines...) Expand all
70 protected: 71 protected:
71 IBusBridge(); 72 IBusBridge();
72 73
73 private: 74 private:
74 DISALLOW_COPY_AND_ASSIGN(IBusBridge); 75 DISALLOW_COPY_AND_ASSIGN(IBusBridge);
75 }; 76 };
76 77
77 } // namespace chromeos 78 } // namespace chromeos
78 79
79 #endif // CHROMEOS_IME_IBUS_BRIDGE_H_ 80 #endif // CHROMEOS_IME_IBUS_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698