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

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

Issue 1554983002: Build chrome.input.ime.* API in GN mode. (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
(Empty)
1 // Copyright 2016 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.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_EVENT_ROUTER_BASE_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_EVENT_ROUTER_BASE_H_
7
8 #include <map>
9 #include <string>
10 #include <utility>
11
12 #include "base/macros.h"
13 #include "chrome/browser/profiles/profile.h"
14 #include "extensions/browser/extension_function.h"
15 #include "ui/base/ime/ime_engine_handler_interface.h"
16
17 class Profile;
18
19 namespace ui {
20 class IMEEngineHandlerInterface;
21 } // namespace ui
22
23 namespace extensions {
24
25 class InputImeEventRouterBase {
26 public:
27 explicit InputImeEventRouterBase(Profile* profile);
28 ~InputImeEventRouterBase();
Shu Chen 2016/01/06 07:00:08 virtual
Azure Wei 2016/01/06 08:00:01 Done.
29
30 // Called when a key event was handled.
31 void OnKeyEventHandled(const std::string& extension_id,
32 const std::string& request_id,
33 bool handled);
34
35 std::string AddRequest(
36 const std::string& component_id,
37 ui::IMEEngineHandlerInterface::KeyEventDoneCallback& key_data);
38
39 protected:
40 using RequestMap =
41 std::map<std::string,
42 std::pair<std::string,
43 ui::IMEEngineHandlerInterface::KeyEventDoneCallback>>;
44
45 unsigned int next_request_id_;
Shu Chen 2016/01/06 07:00:08 these should be private.
Azure Wei 2016/01/06 08:00:01 Done.
46 RequestMap request_map_;
47 Profile* profile_;
48
49 DISALLOW_COPY_AND_ASSIGN(InputImeEventRouterBase);
50 };
51
52 } // namespace extensions
53
54 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_EVENT_ROUTER_BASE_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698