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

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"
Devlin 2016/01/07 23:08:29 forward declare
Azure Wei 2016/01/08 06:40:55 Done.
14 #include "extensions/browser/extension_function.h"
Devlin 2016/01/07 23:08:29 needed?
Azure Wei 2016/01/08 06:40:55 Deleted.
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 virtual ~InputImeEventRouterBase();
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:
Devlin 2016/01/07 23:08:29 indentation. Also, probably prefer a profile() acc
Azure Wei 2016/01/08 06:40:55 Done.
40 Profile* profile_;
41
42 private:
43 using RequestMap =
44 std::map<std::string,
45 std::pair<std::string,
46 ui::IMEEngineHandlerInterface::KeyEventDoneCallback>>;
47
48 unsigned int next_request_id_;
49 RequestMap request_map_;
50
51 DISALLOW_COPY_AND_ASSIGN(InputImeEventRouterBase);
52 };
53
54 } // namespace extensions
55
56 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_EVENT_ROUTER_BASE_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698