1 // Copyright 2013 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.
5 #ifndef WIN8_METRO_DRIVER_IME_INPUT_SOURCE_H_
6 #define WIN8_METRO_DRIVER_IME_INPUT_SOURCE_H_
10 #include "base/memory/scoped_ptr.h"
12 namespace metro_driver
{
14 class InputSourceObserver
;
16 // An interface through which information about the input source can be
17 // retrieved, where an input source represents an IME or a keyboard layout.
20 virtual ~InputSource() {}
21 // Create an instance. Returns NULL if fails.
22 static scoped_ptr
<InputSource
> Create();
24 // Returns true if |langid| and |is_ime| are filled based on the current
25 // active input source.
26 virtual bool GetActiveSource(LANGID
* langid
, bool* is_ime
) = 0;
28 // Adds/Removes an observer to receive notifications when the active input
30 virtual void AddObserver(InputSourceObserver
* observer
) = 0;
31 virtual void RemoveObserver(InputSourceObserver
* observer
) = 0;
34 } // namespace metro_driver
36 #endif // WIN8_METRO_DRIVER_IME_INPUT_SOURCE_H_