| Index: chrome/browser/chromeos/input_method/input_method_whitelist.h
|
| diff --git a/chrome/browser/chromeos/input_method/input_method_whitelist.h b/chrome/browser/chromeos/input_method/input_method_whitelist.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..834c3c979ba329a5869907579ad57bf2b50d7206
|
| --- /dev/null
|
| +++ b/chrome/browser/chromeos/input_method/input_method_whitelist.h
|
| @@ -0,0 +1,47 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_WHITELIST_H_
|
| +#define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_WHITELIST_H_
|
| +#pragma once
|
| +
|
| +#include <set>
|
| +#include <string>
|
| +#include <vector>
|
| +
|
| +#include "base/basictypes.h"
|
| +
|
| +namespace chromeos {
|
| +namespace input_method {
|
| +
|
| +class InputMethodDescriptor;
|
| +typedef std::vector<InputMethodDescriptor> InputMethodDescriptors;
|
| +
|
| +//
|
| +class InputMethodWhitelist {
|
| + public:
|
| + InputMethodWhitelist();
|
| + ~InputMethodWhitelist();
|
| +
|
| + // Returns true if |input_method_id| is whitelisted.
|
| + bool InputMethodIdIsWhitelisted(const std::string& input_method_id) const;
|
| + // Returns true if |xkb_layout| is supported.
|
| + bool XkbLayoutIsSupported(const std::string& xkb_layout) const;
|
| +
|
| + // Returns all input methods that are supported, including ones not active.
|
| + // Caller has to delete the returned list. This function never returns NULL.
|
| + // Note that input method extensions are not included in the result.
|
| + InputMethodDescriptors* GetSupportedInputMethods() const;
|
| +
|
| + private:
|
| + std::set<std::string> supported_input_methods_;
|
| + std::set<std::string> supported_layouts_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(InputMethodWhitelist);
|
| +};
|
| +
|
| +} // namespace input_method
|
| +} // namespace chromeos
|
| +
|
| +#endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_WHITELIST_H_
|
|
|