From 4d4da408e0c9f7c7c98af498ff027943c5e31bcc Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 29 Jul 2022 21:51:36 +0100 Subject: [PATCH] Eliminate Win32 suffixes in KeyboardManager (flutter/engine#35008) This renames KeyboardManagerWin32 to KeyboardManager and updates all usage sites and tests. This is a followup to 89bbfcc, which applied most of the straightforward renamings of FooWin32 to Foo (or where a superclass Foo exists, FooWindows) to the Windows embedding. In that patch I missed KeyboardManagerWin32, as well as two straightforward file renames: * keyboard_win32_common.{h,cc} -> keyboard_utils.{h,cc} * system_utils_win32.cc -> system_utils.cc No new tests since this is a rename with no semantic change intended. Issue: https://github.com/flutter/flutter/issues/108386 --- .../ci/licenses_golden/licenses_flutter | 14 +++---- .../flutter/shell/platform/windows/BUILD.gn | 14 +++---- .../windows/flutter_window_unittests.cc | 2 +- .../windows/keyboard_key_channel_handler.cc | 2 +- .../windows/keyboard_key_embedder_handler.cc | 2 +- .../platform/windows/keyboard_key_handler.cc | 2 +- ...d_manager_win32.cc => keyboard_manager.cc} | 40 +++++++++---------- ...ard_manager_win32.h => keyboard_manager.h} | 22 +++++----- ...n32_unittests.cc => keyboard_unittests.cc} | 35 ++++++++-------- ...oard_win32_common.cc => keyboard_utils.cc} | 2 +- ...yboard_win32_common.h => keyboard_utils.h} | 0 ...ittests.cc => keyboard_utils_unittests.cc} | 2 +- ...{system_utils_win32.cc => system_utils.cc} | 0 .../flutter/shell/platform/windows/window.cc | 5 +-- .../flutter/shell/platform/windows/window.h | 12 +++--- 15 files changed, 74 insertions(+), 80 deletions(-) rename engine/src/flutter/shell/platform/windows/{keyboard_manager_win32.cc => keyboard_manager.cc} (92%) rename engine/src/flutter/shell/platform/windows/{keyboard_manager_win32.h => keyboard_manager.h} (91%) rename engine/src/flutter/shell/platform/windows/{keyboard_win32_unittests.cc => keyboard_unittests.cc} (98%) rename engine/src/flutter/shell/platform/windows/{keyboard_win32_common.cc => keyboard_utils.cc} (96%) rename engine/src/flutter/shell/platform/windows/{keyboard_win32_common.h => keyboard_utils.h} (100%) rename engine/src/flutter/shell/platform/windows/{keyboard_win32_common_unittests.cc => keyboard_utils_unittests.cc} (92%) rename engine/src/flutter/shell/platform/windows/{system_utils_win32.cc => system_utils.cc} (100%) diff --git a/engine/src/flutter/ci/licenses_golden/licenses_flutter b/engine/src/flutter/ci/licenses_golden/licenses_flutter index f20f61fd29..0721913cb8 100644 --- a/engine/src/flutter/ci/licenses_golden/licenses_flutter +++ b/engine/src/flutter/ci/licenses_golden/licenses_flutter @@ -2403,12 +2403,12 @@ FILE: ../../../flutter/shell/platform/windows/keyboard_key_embedder_handler_unit FILE: ../../../flutter/shell/platform/windows/keyboard_key_handler.cc FILE: ../../../flutter/shell/platform/windows/keyboard_key_handler.h FILE: ../../../flutter/shell/platform/windows/keyboard_key_handler_unittests.cc -FILE: ../../../flutter/shell/platform/windows/keyboard_manager_win32.cc -FILE: ../../../flutter/shell/platform/windows/keyboard_manager_win32.h -FILE: ../../../flutter/shell/platform/windows/keyboard_win32_common.cc -FILE: ../../../flutter/shell/platform/windows/keyboard_win32_common.h -FILE: ../../../flutter/shell/platform/windows/keyboard_win32_common_unittests.cc -FILE: ../../../flutter/shell/platform/windows/keyboard_win32_unittests.cc +FILE: ../../../flutter/shell/platform/windows/keyboard_manager.cc +FILE: ../../../flutter/shell/platform/windows/keyboard_manager.h +FILE: ../../../flutter/shell/platform/windows/keyboard_unittests.cc +FILE: ../../../flutter/shell/platform/windows/keyboard_utils.cc +FILE: ../../../flutter/shell/platform/windows/keyboard_utils.h +FILE: ../../../flutter/shell/platform/windows/keyboard_utils_unittests.cc FILE: ../../../flutter/shell/platform/windows/platform_handler.cc FILE: ../../../flutter/shell/platform/windows/platform_handler.h FILE: ../../../flutter/shell/platform/windows/platform_handler_unittests.cc @@ -2424,9 +2424,9 @@ FILE: ../../../flutter/shell/platform/windows/settings_plugin.h FILE: ../../../flutter/shell/platform/windows/settings_plugin_unittests.cc FILE: ../../../flutter/shell/platform/windows/settings_plugin_win32.cc FILE: ../../../flutter/shell/platform/windows/settings_plugin_win32.h +FILE: ../../../flutter/shell/platform/windows/system_utils.cc FILE: ../../../flutter/shell/platform/windows/system_utils.h FILE: ../../../flutter/shell/platform/windows/system_utils_unittests.cc -FILE: ../../../flutter/shell/platform/windows/system_utils_win32.cc FILE: ../../../flutter/shell/platform/windows/task_runner.cc FILE: ../../../flutter/shell/platform/windows/task_runner.h FILE: ../../../flutter/shell/platform/windows/task_runner_unittests.cc diff --git a/engine/src/flutter/shell/platform/windows/BUILD.gn b/engine/src/flutter/shell/platform/windows/BUILD.gn index 11920d513f..a24bff2566 100644 --- a/engine/src/flutter/shell/platform/windows/BUILD.gn +++ b/engine/src/flutter/shell/platform/windows/BUILD.gn @@ -76,10 +76,10 @@ source_set("flutter_windows_source") { "keyboard_key_embedder_handler.h", "keyboard_key_handler.cc", "keyboard_key_handler.h", - "keyboard_manager_win32.cc", - "keyboard_manager_win32.h", - "keyboard_win32_common.cc", - "keyboard_win32_common.h", + "keyboard_manager.cc", + "keyboard_manager.h", + "keyboard_utils.cc", + "keyboard_utils.h", "platform_handler.cc", "platform_handler.h", "platform_handler_win32.cc", @@ -90,8 +90,8 @@ source_set("flutter_windows_source") { "settings_plugin.h", "settings_plugin_win32.cc", "settings_plugin_win32.h", + "system_utils.cc", "system_utils.h", - "system_utils_win32.cc", "task_runner.cc", "task_runner.h", "task_runner_win32.cc", @@ -183,8 +183,8 @@ executable("flutter_windows_unittests") { "keyboard_key_channel_handler_unittests.cc", "keyboard_key_embedder_handler_unittests.cc", "keyboard_key_handler_unittests.cc", - "keyboard_win32_common_unittests.cc", - "keyboard_win32_unittests.cc", + "keyboard_unittests.cc", + "keyboard_utils_unittests.cc", "platform_handler_unittests.cc", "platform_handler_win32_unittests.cc", "sequential_id_generator_unittests.cc", diff --git a/engine/src/flutter/shell/platform/windows/flutter_window_unittests.cc b/engine/src/flutter/shell/platform/windows/flutter_window_unittests.cc index 116773899f..5f136d6236 100644 --- a/engine/src/flutter/shell/platform/windows/flutter_window_unittests.cc +++ b/engine/src/flutter/shell/platform/windows/flutter_window_unittests.cc @@ -137,7 +137,7 @@ class MockFlutterWindow : public FlutterWindow { MOCK_METHOD1(Win32MapVkToChar, uint32_t(uint32_t)); protected: - // |KeyboardManagerWin32::WindowDelegate| + // |KeyboardManager::WindowDelegate| LRESULT Win32DefWindowProc(HWND hWnd, UINT Msg, WPARAM wParam, diff --git a/engine/src/flutter/shell/platform/windows/keyboard_key_channel_handler.cc b/engine/src/flutter/shell/platform/windows/keyboard_key_channel_handler.cc index a3df323923..0359903b9e 100644 --- a/engine/src/flutter/shell/platform/windows/keyboard_key_channel_handler.cc +++ b/engine/src/flutter/shell/platform/windows/keyboard_key_channel_handler.cc @@ -9,7 +9,7 @@ #include #include "flutter/shell/platform/common/json_message_codec.h" -#include "flutter/shell/platform/windows/keyboard_win32_common.h" +#include "flutter/shell/platform/windows/keyboard_utils.h" namespace flutter { diff --git a/engine/src/flutter/shell/platform/windows/keyboard_key_embedder_handler.cc b/engine/src/flutter/shell/platform/windows/keyboard_key_embedder_handler.cc index 762051e723..5d596091a4 100644 --- a/engine/src/flutter/shell/platform/windows/keyboard_key_embedder_handler.cc +++ b/engine/src/flutter/shell/platform/windows/keyboard_key_embedder_handler.cc @@ -11,7 +11,7 @@ #include #include -#include "flutter/shell/platform/windows/keyboard_win32_common.h" +#include "flutter/shell/platform/windows/keyboard_utils.h" namespace flutter { diff --git a/engine/src/flutter/shell/platform/windows/keyboard_key_handler.cc b/engine/src/flutter/shell/platform/windows/keyboard_key_handler.cc index 3306ae534e..d31aee1c28 100644 --- a/engine/src/flutter/shell/platform/windows/keyboard_key_handler.cc +++ b/engine/src/flutter/shell/platform/windows/keyboard_key_handler.cc @@ -8,7 +8,7 @@ #include -#include "flutter/shell/platform/windows/keyboard_win32_common.h" +#include "flutter/shell/platform/windows/keyboard_utils.h" namespace flutter { diff --git a/engine/src/flutter/shell/platform/windows/keyboard_manager_win32.cc b/engine/src/flutter/shell/platform/windows/keyboard_manager.cc similarity index 92% rename from engine/src/flutter/shell/platform/windows/keyboard_manager_win32.cc rename to engine/src/flutter/shell/platform/windows/keyboard_manager.cc index c8ea813f81..5bd25a6366 100644 --- a/engine/src/flutter/shell/platform/windows/keyboard_manager_win32.cc +++ b/engine/src/flutter/shell/platform/windows/keyboard_manager.cc @@ -7,9 +7,8 @@ #include #include -#include "keyboard_manager_win32.h" - -#include "keyboard_win32_common.h" +#include "flutter/shell/platform/windows/keyboard_manager.h" +#include "flutter/shell/platform/windows/keyboard_utils.h" namespace flutter { @@ -104,14 +103,13 @@ static bool IsSysAction(UINT action) { } // namespace -KeyboardManagerWin32::KeyboardManagerWin32(WindowDelegate* delegate) +KeyboardManager::KeyboardManager(WindowDelegate* delegate) : window_delegate_(delegate), last_key_is_ctrl_left_down(false), should_synthesize_ctrl_left_up(false), processing_event_(false) {} -void KeyboardManagerWin32::RedispatchEvent( - std::unique_ptr event) { +void KeyboardManager::RedispatchEvent(std::unique_ptr event) { for (const Win32Message& message : event->session) { // Never redispatch sys keys, because their original messages have been // passed to the system default processor. @@ -134,9 +132,9 @@ void KeyboardManagerWin32::RedispatchEvent( } } -bool KeyboardManagerWin32::RemoveRedispatchedMessage(UINT const action, - WPARAM const wparam, - LPARAM const lparam) { +bool KeyboardManager::RemoveRedispatchedMessage(UINT const action, + WPARAM const wparam, + LPARAM const lparam) { for (auto iter = pending_redispatches_.begin(); iter != pending_redispatches_.end(); ++iter) { if (action == iter->action && wparam == iter->wparam) { @@ -147,9 +145,9 @@ bool KeyboardManagerWin32::RemoveRedispatchedMessage(UINT const action, return false; } -bool KeyboardManagerWin32::HandleMessage(UINT const action, - WPARAM const wparam, - LPARAM const lparam) { +bool KeyboardManager::HandleMessage(UINT const action, + WPARAM const wparam, + LPARAM const lparam) { if (RemoveRedispatchedMessage(action, wparam, lparam)) { return false; } @@ -331,7 +329,7 @@ bool KeyboardManagerWin32::HandleMessage(UINT const action, return false; } -void KeyboardManagerWin32::ProcessNextEvent() { +void KeyboardManager::ProcessNextEvent() { if (processing_event_ || pending_events_.empty()) { return; } @@ -345,9 +343,8 @@ void KeyboardManagerWin32::ProcessNextEvent() { }); } -void KeyboardManagerWin32::PerformProcessEvent( - std::unique_ptr event, - std::function callback) { +void KeyboardManager::PerformProcessEvent(std::unique_ptr event, + std::function callback) { // PendingEvent::action being WM_CHAR means this is a char message without // a preceding key message, and should be dispatched immediately. if (event->action == WM_CHAR) { @@ -369,9 +366,8 @@ void KeyboardManagerWin32::PerformProcessEvent( }); } -void KeyboardManagerWin32::HandleOnKeyResult( - std::unique_ptr event, - bool framework_handled) { +void KeyboardManager::HandleOnKeyResult(std::unique_ptr event, + bool framework_handled) { const UINT last_action = event->session.back().action; // SYS messages must not be redispached, and their text content is not // dispatched either. @@ -391,7 +387,7 @@ void KeyboardManagerWin32::HandleOnKeyResult( RedispatchEvent(std::move(event)); } -void KeyboardManagerWin32::DispatchText(const PendingEvent& event) { +void KeyboardManager::DispatchText(const PendingEvent& event) { // Check if the character is printable based on the last wparam, which works // even if the last wparam is a low surrogate, because the only unprintable // keys defined by `IsPrintable` are certain characters at lower ASCII range. @@ -406,8 +402,8 @@ void KeyboardManagerWin32::DispatchText(const PendingEvent& event) { } } -UINT KeyboardManagerWin32::PeekNextMessageType(UINT wMsgFilterMin, - UINT wMsgFilterMax) { +UINT KeyboardManager::PeekNextMessageType(UINT wMsgFilterMin, + UINT wMsgFilterMax) { MSG next_message; BOOL has_msg = window_delegate_->Win32PeekMessage( &next_message, wMsgFilterMin, wMsgFilterMax, PM_NOREMOVE); diff --git a/engine/src/flutter/shell/platform/windows/keyboard_manager_win32.h b/engine/src/flutter/shell/platform/windows/keyboard_manager.h similarity index 91% rename from engine/src/flutter/shell/platform/windows/keyboard_manager_win32.h rename to engine/src/flutter/shell/platform/windows/keyboard_manager.h index 08998856c9..0b1025bb8b 100644 --- a/engine/src/flutter/shell/platform/windows/keyboard_manager_win32.h +++ b/engine/src/flutter/shell/platform/windows/keyboard_manager.h @@ -15,17 +15,17 @@ namespace flutter { // Handles keyboard and text messages on Win32. // -// |KeyboardManagerWin32| consumes raw Win32 messages related to key and chars, -// and converts them to key calls (|WindowDelegate::OnKey|) and possibly -// text calls (|WindowDelegate::OnText|). +// |KeyboardManager| consumes raw Win32 messages related to key and chars, and +// converts them to key calls (|WindowDelegate::OnKey|) and possibly text calls +// (|WindowDelegate::OnText|). // -// |KeyboardManagerWin32| requires a |WindowDelegate| to define how to -// access Win32 system calls (to allow mocking) and where to send the results -// of key calls and text calls to. +// |KeyboardManager| requires a |WindowDelegate| to define how to access Win32 +// system calls (to allow mocking) and where to send the results of key calls +// and text calls to. // -// Typically, |KeyboardManagerWin32| is owned by a |Window|, which also -// implements the window delegate. The key calls and text calls are forwarded -// to those of |Window|'s, and consequently, those of |FlutterWindowsView|'s. +// Typically, |KeyboardManager| is owned by a |Window|, which also implements +// the window delegate. The key calls and text calls are forwarded to those of +// |Window|'s, and consequently, those of |FlutterWindowsView|'s. // // ## Terminology // @@ -40,7 +40,7 @@ namespace flutter { // * Event: A FlutterKeyEvent/ui.KeyData sent to the framework. // * Call: A call to |WindowDelegate::OnKey| or |WindowDelegate::OnText|, // which contains semi-processed messages. -class KeyboardManagerWin32 { +class KeyboardManager { public: // Define how the keyboard manager accesses Win32 system calls (to allow // mocking) and sends key calls and and text calls. @@ -89,7 +89,7 @@ class KeyboardManagerWin32 { using KeyEventCallback = WindowDelegate::KeyEventCallback; - explicit KeyboardManagerWin32(WindowDelegate* delegate); + explicit KeyboardManager(WindowDelegate* delegate); // Processes Win32 messages related to keyboard and text. // diff --git a/engine/src/flutter/shell/platform/windows/keyboard_win32_unittests.cc b/engine/src/flutter/shell/platform/windows/keyboard_unittests.cc similarity index 98% rename from engine/src/flutter/shell/platform/windows/keyboard_win32_unittests.cc rename to engine/src/flutter/shell/platform/windows/keyboard_unittests.cc index 7b21788e79..0bea6b9716 100644 --- a/engine/src/flutter/shell/platform/windows/keyboard_win32_unittests.cc +++ b/engine/src/flutter/shell/platform/windows/keyboard_unittests.cc @@ -10,7 +10,7 @@ #include "flutter/shell/platform/windows/keyboard_key_channel_handler.h" #include "flutter/shell/platform/windows/keyboard_key_embedder_handler.h" #include "flutter/shell/platform/windows/keyboard_key_handler.h" -#include "flutter/shell/platform/windows/keyboard_manager_win32.h" +#include "flutter/shell/platform/windows/keyboard_manager.h" #include "flutter/shell/platform/windows/testing/engine_modifier.h" #include "flutter/shell/platform/windows/testing/mock_window_binding_handler.h" #include "flutter/shell/platform/windows/testing/test_keyboard.h" @@ -94,10 +94,10 @@ UINT LayoutFrench(UINT uCode, UINT uMapType) { } } -class TestKeyboardManagerWin32 : public KeyboardManagerWin32 { +class TestKeyboardManager : public KeyboardManager { public: - explicit TestKeyboardManagerWin32(WindowDelegate* delegate) - : KeyboardManagerWin32(delegate) {} + explicit TestKeyboardManager(WindowDelegate* delegate) + : KeyboardManager(delegate) {} bool DuringRedispatch() { return during_redispatch_; } @@ -105,7 +105,7 @@ class TestKeyboardManagerWin32 : public KeyboardManagerWin32 { void RedispatchEvent(std::unique_ptr event) override { assert(!during_redispatch_); during_redispatch_ = true; - KeyboardManagerWin32::RedispatchEvent(std::move(event)); + KeyboardManager::RedispatchEvent(std::move(event)); during_redispatch_ = false; } @@ -175,18 +175,17 @@ class TestKeystate { std::map state_; }; -class MockKeyboardManagerWin32Delegate - : public KeyboardManagerWin32::WindowDelegate, - protected MockMessageQueue { +class MockKeyboardManagerDelegate : public KeyboardManager::WindowDelegate, + protected MockMessageQueue { public: - MockKeyboardManagerWin32Delegate(WindowBindingHandlerDelegate* view, - MapVirtualKeyToChar map_vk_to_char) + MockKeyboardManagerDelegate(WindowBindingHandlerDelegate* view, + MapVirtualKeyToChar map_vk_to_char) : view_(view), map_vk_to_char_(std::move(map_vk_to_char)) { - keyboard_manager_ = std::make_unique(this); + keyboard_manager_ = std::make_unique(this); } - virtual ~MockKeyboardManagerWin32Delegate() {} + virtual ~MockKeyboardManagerDelegate() {} - // |KeyboardManagerWin32::WindowDelegate| + // |KeyboardManager::WindowDelegate| void OnKey(int key, int scancode, int action, @@ -198,7 +197,7 @@ class MockKeyboardManagerWin32Delegate callback); } - // |KeyboardManagerWin32::WindowDelegate| + // |KeyboardManager::WindowDelegate| void OnText(const std::u16string& text) override { view_->OnText(text); } SHORT GetKeyState(int virtual_key) { return key_state_.Get(virtual_key); } @@ -306,7 +305,7 @@ class MockKeyboardManagerWin32Delegate }; WindowBindingHandlerDelegate* view_; - std::unique_ptr keyboard_manager_; + std::unique_ptr keyboard_manager_; std::list forged_message_expectations_; MapVirtualKeyToChar map_vk_to_char_; TestKeystate key_state_; @@ -446,14 +445,14 @@ class KeyboardTester { }); callback_handler(event, callback); })); - window_ = std::make_unique( + window_ = std::make_unique( view_.get(), [this](UINT virtual_key) -> SHORT { return map_virtual_key_layout_(virtual_key, MAPVK_VK_TO_CHAR); }); } TestFlutterWindowsView& GetView() { return *view_; } - MockKeyboardManagerWin32Delegate& GetWindow() { return *window_; } + MockKeyboardManagerDelegate& GetWindow() { return *window_; } // Set all events to be handled (true) or unhandled (false). void Responding(bool response) { callback_handler_ = RespondValue(response); } @@ -489,7 +488,7 @@ class KeyboardTester { private: std::unique_ptr view_; - std::unique_ptr window_; + std::unique_ptr window_; MockKeyResponseController::EmbedderCallbackHandler callback_handler_; MapVirtualKeyLayout map_virtual_key_layout_; diff --git a/engine/src/flutter/shell/platform/windows/keyboard_win32_common.cc b/engine/src/flutter/shell/platform/windows/keyboard_utils.cc similarity index 96% rename from engine/src/flutter/shell/platform/windows/keyboard_win32_common.cc rename to engine/src/flutter/shell/platform/windows/keyboard_utils.cc index 8c12eb555d..030123b835 100644 --- a/engine/src/flutter/shell/platform/windows/keyboard_win32_common.cc +++ b/engine/src/flutter/shell/platform/windows/keyboard_utils.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "keyboard_win32_common.h" +#include "keyboard_utils.h" namespace flutter { diff --git a/engine/src/flutter/shell/platform/windows/keyboard_win32_common.h b/engine/src/flutter/shell/platform/windows/keyboard_utils.h similarity index 100% rename from engine/src/flutter/shell/platform/windows/keyboard_win32_common.h rename to engine/src/flutter/shell/platform/windows/keyboard_utils.h diff --git a/engine/src/flutter/shell/platform/windows/keyboard_win32_common_unittests.cc b/engine/src/flutter/shell/platform/windows/keyboard_utils_unittests.cc similarity index 92% rename from engine/src/flutter/shell/platform/windows/keyboard_win32_common_unittests.cc rename to engine/src/flutter/shell/platform/windows/keyboard_utils_unittests.cc index ba73278b2a..250a16e123 100644 --- a/engine/src/flutter/shell/platform/windows/keyboard_win32_common_unittests.cc +++ b/engine/src/flutter/shell/platform/windows/keyboard_utils_unittests.cc @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "flutter/shell/platform/windows/keyboard_win32_common.h" +#include "flutter/shell/platform/windows/keyboard_utils.h" #include "gtest/gtest.h" diff --git a/engine/src/flutter/shell/platform/windows/system_utils_win32.cc b/engine/src/flutter/shell/platform/windows/system_utils.cc similarity index 100% rename from engine/src/flutter/shell/platform/windows/system_utils_win32.cc rename to engine/src/flutter/shell/platform/windows/system_utils.cc diff --git a/engine/src/flutter/shell/platform/windows/window.cc b/engine/src/flutter/shell/platform/windows/window.cc index 3818f3095d..a61ac35a4c 100644 --- a/engine/src/flutter/shell/platform/windows/window.cc +++ b/engine/src/flutter/shell/platform/windows/window.cc @@ -14,8 +14,7 @@ #include -#include "dpi_utils.h" -#include "keyboard_win32_common.h" +#include "flutter/shell/platform/windows/dpi_utils.h" namespace flutter { @@ -71,7 +70,7 @@ Window::Window(std::unique_ptr text_input_manager) if (text_input_manager_ == nullptr) { text_input_manager_ = std::make_unique(); } - keyboard_manager_ = std::make_unique(this); + keyboard_manager_ = std::make_unique(this); } Window::~Window() { diff --git a/engine/src/flutter/shell/platform/windows/window.h b/engine/src/flutter/shell/platform/windows/window.h index 2f8908628a..fe62fa5d2e 100644 --- a/engine/src/flutter/shell/platform/windows/window.h +++ b/engine/src/flutter/shell/platform/windows/window.h @@ -15,7 +15,7 @@ #include "flutter/shell/platform/embedder/embedder.h" #include "flutter/shell/platform/windows/direct_manipulation.h" -#include "flutter/shell/platform/windows/keyboard_manager_win32.h" +#include "flutter/shell/platform/windows/keyboard_manager.h" #include "flutter/shell/platform/windows/sequential_id_generator.h" #include "flutter/shell/platform/windows/text_input_manager.h" #include "flutter/third_party/accessibility/gfx/native_widget_types.h" @@ -25,7 +25,7 @@ namespace flutter { // A class abstraction for a high DPI aware Win32 Window. Intended to be // inherited from by classes that wish to specialize with custom // rendering and input handling. -class Window : public KeyboardManagerWin32::WindowDelegate { +class Window : public KeyboardManager::WindowDelegate { public: Window(); Window(std::unique_ptr text_input_manager); @@ -40,16 +40,16 @@ class Window : public KeyboardManagerWin32::WindowDelegate { HWND GetWindowHandle(); - // |KeyboardManagerWin32::WindowDelegate| + // |KeyboardManager::WindowDelegate| virtual BOOL Win32PeekMessage(LPMSG lpMsg, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg) override; - // |KeyboardManagerWin32::WindowDelegate| + // |KeyboardManager::WindowDelegate| virtual uint32_t Win32MapVkToChar(uint32_t virtual_key) override; - // |KeyboardManagerWin32::WindowDelegate| + // |KeyboardManager::WindowDelegate| virtual UINT Win32DispatchMessage(UINT Msg, WPARAM wParam, LPARAM lParam) override; @@ -270,7 +270,7 @@ class Window : public KeyboardManagerWin32::WindowDelegate { std::unique_ptr text_input_manager_; // Manages IME state. - std::unique_ptr keyboard_manager_; + std::unique_ptr keyboard_manager_; // Used for temporarily storing the WM_TOUCH-provided touch points. std::vector touch_points_;