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

Side by Side Diff: chrome/browser/extensions/api/input_ime/input_ime_api.h

Issue 1590863002: Move the local struct definitions off ui/base/ime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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 CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/singleton.h" 13 #include "base/memory/singleton.h"
14 #include "base/scoped_observer.h" 14 #include "base/scoped_observer.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "chrome/browser/input_method/input_method_engine_base.h"
17 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
18 #include "components/keyed_service/core/keyed_service.h" 19 #include "components/keyed_service/core/keyed_service.h"
19 #include "extensions/browser/browser_context_keyed_api_factory.h" 20 #include "extensions/browser/browser_context_keyed_api_factory.h"
20 #include "extensions/browser/event_router.h" 21 #include "extensions/browser/event_router.h"
21 #include "extensions/browser/extension_function.h" 22 #include "extensions/browser/extension_function.h"
22 #include "extensions/browser/extension_registry_observer.h" 23 #include "extensions/browser/extension_registry_observer.h"
23 #include "extensions/common/extension.h" 24 #include "extensions/common/extension.h"
24 #include "ui/base/ime/ime_engine_handler_interface.h" 25 #include "ui/base/ime/ime_engine_handler_interface.h"
25 #include "ui/base/ime/ime_engine_observer.h" 26 #include "ui/base/ime/ime_engine_observer.h"
26 #include "ui/base/ime/text_input_flags.h" 27 #include "ui/base/ime/text_input_flags.h"
27 28
28 #if defined(OS_CHROMEOS) 29 #if defined(OS_CHROMEOS)
29 #include "chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h" 30 #include "chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h"
30 #elif defined(OS_LINUX) || defined(OS_WIN) 31 #elif defined(OS_LINUX) || defined(OS_WIN)
31 #include "chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h" 32 #include "chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h"
32 #endif // defined(OS_CHROMEOS) 33 #endif // defined(OS_CHROMEOS)
33 34
34 class Profile; 35 class Profile;
35 36
36 namespace ui { 37 namespace ui {
37 class IMEEngineHandlerInterface; 38 class IMEEngineHandlerInterface;
38 class IMEEngineObserver; 39 class IMEEngineObserver;
39 40
40 class ImeObserver : public IMEEngineObserver { 41 class ImeObserver : public input_method::InputMethodEngineBase::Observer {
41 public: 42 public:
42 ImeObserver(const std::string& extension_id, Profile* profile); 43 ImeObserver(const std::string& extension_id, Profile* profile);
43 44
44 ~ImeObserver() override {} 45 ~ImeObserver() override {}
45 46
46 // IMEEngineObserver overrides. 47 // input_method::InputMethodEngineBase::Observer overrides.
47 void OnActivate(const std::string& component_id) override; 48 void OnActivate(const std::string& component_id) override;
48 void OnFocus(const IMEEngineHandlerInterface::InputContext& context) override; 49 void OnFocus(const IMEEngineHandlerInterface::InputContext& context) override;
49 void OnBlur(int context_id) override; 50 void OnBlur(int context_id) override;
50 void OnKeyEvent( 51 void OnKeyEvent(
51 const std::string& component_id, 52 const std::string& component_id,
52 const IMEEngineHandlerInterface::KeyboardEvent& event, 53 const input_method::InputMethodEngineBase::KeyboardEvent& event,
53 IMEEngineHandlerInterface::KeyEventDoneCallback& key_data) override; 54 IMEEngineHandlerInterface::KeyEventDoneCallback& key_data) override;
54 void OnReset(const std::string& component_id) override; 55 void OnReset(const std::string& component_id) override;
55 void OnDeactivated(const std::string& component_id) override; 56 void OnDeactivated(const std::string& component_id) override;
56 void OnCompositionBoundsChanged( 57 void OnCompositionBoundsChanged(
57 const std::vector<gfx::Rect>& bounds) override; 58 const std::vector<gfx::Rect>& bounds) override;
58 bool IsInterestedInKeyEvent() const override; 59 bool IsInterestedInKeyEvent() const override;
59 void OnSurroundingTextChanged(const std::string& component_id, 60 void OnSurroundingTextChanged(const std::string& component_id,
60 const std::string& text, 61 const std::string& text,
61 int cursor_pos, 62 int cursor_pos,
62 int anchor_pos, 63 int anchor_pos,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Listen to extension load, unloaded notifications. 165 // Listen to extension load, unloaded notifications.
165 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 166 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
166 extension_registry_observer_; 167 extension_registry_observer_;
167 }; 168 };
168 169
169 InputImeEventRouter* GetInputImeEventRouter(Profile* profile); 170 InputImeEventRouter* GetInputImeEventRouter(Profile* profile);
170 171
171 } // namespace extensions 172 } // namespace extensions
172 173
173 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_ 174 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698