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

Unified Diff: chrome/browser/extensions/extension_input_ime_api.h

Issue 10735074: Moving input_ime to api/ . (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Indentation Created 8 years, 5 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/extensions/extension_input_ime_api.h
diff --git a/chrome/browser/extensions/extension_input_ime_api.h b/chrome/browser/extensions/extension_input_ime_api.h
deleted file mode 100644
index b88b0760232fafe0c607a9ea6d853ae616e70d38..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/extension_input_ime_api.h
+++ /dev/null
@@ -1,171 +0,0 @@
-// 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_EXTENSIONS_EXTENSION_INPUT_IME_API_H_
-#define CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_IME_API_H_
-
-#include "chrome/browser/extensions/extension_function.h"
-
-#include "base/memory/singleton.h"
-#include "base/values.h"
-#include "chrome/browser/chromeos/input_method/input_method_engine.h"
-#include "chrome/common/extensions/extension.h"
-
-#include <map>
-#include <string>
-#include <vector>
-
-class Profile;
-
-namespace chromeos {
-class InputMethodEngine;
-class ImeObserver;
-}
-
-class ExtensionInputImeEventRouter {
- public:
- static ExtensionInputImeEventRouter* GetInstance();
- void Init();
-
- bool RegisterIme(Profile* profile,
- const std::string& extension_id,
- const extensions::Extension::InputComponentInfo& component);
- void UnregisterAllImes(Profile* profile, const std::string& extension_id);
- chromeos::InputMethodEngine* GetEngine(const std::string& extension_id,
- const std::string& engine_id);
- chromeos::InputMethodEngine* GetActiveEngine(const std::string& extension_id);
-
-
- // Called when a key event was handled.
- void OnEventHandled(const std::string& extension_id,
- const std::string& request_id,
- bool handled);
-
- std::string AddRequest(const std::string& engine_id,
- chromeos::input_method::KeyEventHandle* key_data);
-
- private:
- friend struct DefaultSingletonTraits<ExtensionInputImeEventRouter>;
- typedef std::map<std::string, std::pair<std::string,
- chromeos::input_method::KeyEventHandle*> > RequestMap;
-
- ExtensionInputImeEventRouter();
- ~ExtensionInputImeEventRouter();
-
- std::map<std::string, std::map<std::string, chromeos::InputMethodEngine*> >
- engines_;
- std::map<std::string, std::map<std::string, chromeos::ImeObserver*> >
- observers_;
-
- unsigned int next_request_id_;
- RequestMap request_map_;
-
- DISALLOW_COPY_AND_ASSIGN(ExtensionInputImeEventRouter);
-};
-
-class SetCompositionFunction : public SyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.setComposition");
-
- protected:
- virtual ~SetCompositionFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class ClearCompositionFunction : public SyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.clearComposition");
-
- protected:
- virtual ~ClearCompositionFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class CommitTextFunction : public SyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.commitText");
-
- protected:
- virtual ~CommitTextFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class SetCandidateWindowPropertiesFunction : public SyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.setCandidateWindowProperties");
-
- protected:
- virtual ~SetCandidateWindowPropertiesFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class SetCandidatesFunction : public SyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.setCandidates");
-
- protected:
- virtual ~SetCandidatesFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-
- private:
- bool ReadCandidates(
- ListValue* candidates,
- std::vector<chromeos::InputMethodEngine::Candidate>* output);
-};
-
-class SetCursorPositionFunction : public SyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.setCursorPosition");
-
- protected:
- virtual ~SetCursorPositionFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class SetMenuItemsFunction : public SyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.setMenuItems");
-
- protected:
- virtual ~SetMenuItemsFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class UpdateMenuItemsFunction : public SyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.updateMenuItems");
-
- protected:
- virtual ~UpdateMenuItemsFunction() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-class InputEventHandled : public AsyncExtensionFunction {
- public:
- DECLARE_EXTENSION_FUNCTION_NAME("input.ime.eventHandled");
-
- protected:
- virtual ~InputEventHandled() {}
-
- // ExtensionFunction:
- virtual bool RunImpl() OVERRIDE;
-};
-
-#endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INPUT_IME_API_H_
« no previous file with comments | « chrome/browser/extensions/extension_function_registry.cc ('k') | chrome/browser/extensions/extension_input_ime_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698