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

Unified Diff: chrome/browser/chromeos/input_method/input_method_whitelist.h

Issue 9701095: cleanup: Split ibus_controller.h into 5 headers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698