OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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_CHROMEOS_EVENTS_EVENT_REWRITER_DELEGATE_IMPL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_DELEGATE_IMPL_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "ui/chromeos/events/event_rewriter.h" |
| 10 |
| 11 class PrefService; |
| 12 |
| 13 namespace chromeos { |
| 14 |
| 15 class EventRewriterDelegateImpl : public ui::chromeos::EventRewriter::Delegate { |
| 16 public: |
| 17 EventRewriterDelegateImpl(); |
| 18 ~EventRewriterDelegateImpl() override; |
| 19 |
| 20 void set_pref_service_for_testing(const PrefService* pref_service) { |
| 21 pref_service_for_testing_ = pref_service; |
| 22 } |
| 23 |
| 24 // ui::chromeos::EventRewriter::Delegate: |
| 25 bool RewriteModifierKeys() override; |
| 26 bool GetKeyboardRemappedPrefValue(const std::string& pref_name, |
| 27 int* result) const override; |
| 28 bool TopRowKeysAreFunctionKeys() const override; |
| 29 bool IsExtensionCommandRegistered(ui::KeyboardCode key_code, |
| 30 int flags) const override; |
| 31 |
| 32 private: |
| 33 const PrefService* GetPrefService() const; |
| 34 |
| 35 const PrefService* pref_service_for_testing_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(EventRewriterDelegateImpl); |
| 38 }; |
| 39 |
| 40 } // namespace chromeos |
| 41 |
| 42 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_DELEGATE_IMPL_H_ |
OLD | NEW |