From 0db1571d284ad4c1dfd583ee872203f4e0c90ad2 Mon Sep 17 00:00:00 2001 From: garyqian Date: Fri, 6 Nov 2020 13:07:46 -0800 Subject: [PATCH 1/2] Remove extra method --- shell/common/platform_view.h | 19 ------------------- shell/common/shell.cc | 7 ------- shell/common/shell.h | 4 ---- 3 files changed, 30 deletions(-) diff --git a/shell/common/platform_view.h b/shell/common/platform_view.h index 6e12917b1849b..b92f5b4f8cae6 100644 --- a/shell/common/platform_view.h +++ b/shell/common/platform_view.h @@ -210,25 +210,6 @@ class PlatformView { /// virtual void OnPlatformViewMarkTextureFrameAvailable( int64_t texture_id) = 0; - - //-------------------------------------------------------------------------- - /// @brief Directly invokes platform-specific APIs to compute the - /// locale the platform would have natively resolved to. - /// - /// @param[in] supported_locale_data The vector of strings that represents - /// the locales supported by the app. - /// Each locale consists of three - /// strings: languageCode, countryCode, - /// and scriptCode in that order. - /// - /// @return A vector of 3 strings languageCode, countryCode, and - /// scriptCode that represents the locale selected by the - /// platform. Empty strings mean the value was unassigned. Empty - /// vector represents a null locale. - /// - virtual std::unique_ptr> - ComputePlatformViewResolvedLocale( - const std::vector& supported_locale_data) = 0; }; //---------------------------------------------------------------------------- diff --git a/shell/common/shell.cc b/shell/common/shell.cc index 6fd7f83f26314..1c0c6a4b8a5bc 100644 --- a/shell/common/shell.cc +++ b/shell/common/shell.cc @@ -1182,13 +1182,6 @@ void Shell::SetNeedsReportTimings(bool value) { // |Engine::Delegate| std::unique_ptr> Shell::ComputePlatformResolvedLocale( const std::vector& supported_locale_data) { - return ComputePlatformViewResolvedLocale(supported_locale_data); -} - -// |PlatformView::Delegate| -std::unique_ptr> -Shell::ComputePlatformViewResolvedLocale( - const std::vector& supported_locale_data) { return platform_view_->ComputePlatformResolvedLocales(supported_locale_data); } diff --git a/shell/common/shell.h b/shell/common/shell.h index 8e8fd18b48b3b..89fee66841aa1 100644 --- a/shell/common/shell.h +++ b/shell/common/shell.h @@ -507,10 +507,6 @@ class Shell final : public PlatformView::Delegate, // |PlatformView::Delegate| void OnPlatformViewSetNextFrameCallback(const fml::closure& closure) override; - // |PlatformView::Delegate| - std::unique_ptr> ComputePlatformViewResolvedLocale( - const std::vector& supported_locale_data) override; - // |Animator::Delegate| void OnAnimatorBeginFrame(fml::TimePoint frame_target_time) override; From 074243e0e40f870cf5293da85f3a8e84d4e2f892 Mon Sep 17 00:00:00 2001 From: garyqian Date: Fri, 6 Nov 2020 14:48:35 -0800 Subject: [PATCH 2/2] Fix tests --- .../ios/framework/Source/FlutterEnginePlatformViewTest.mm | 6 ------ .../darwin/ios/framework/Source/FlutterPlatformViewsTest.mm | 6 ------ .../ios/framework/Source/accessibility_bridge_test.mm | 6 ------ 3 files changed, 18 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm index 3e002e2aa78ee..7f081b9c587a7 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterEnginePlatformViewTest.mm @@ -33,12 +33,6 @@ void OnPlatformViewSetAccessibilityFeatures(int32_t flags) override {} void OnPlatformViewRegisterTexture(std::shared_ptr texture) override {} void OnPlatformViewUnregisterTexture(int64_t texture_id) override {} void OnPlatformViewMarkTextureFrameAvailable(int64_t texture_id) override {} - - std::unique_ptr> ComputePlatformViewResolvedLocale( - const std::vector& supported_locale_data) override { - std::unique_ptr> out = std::make_unique>(); - return out; - } }; } // namespace diff --git a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm index f93d88c95e880..f2ec1a7f1b399 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterPlatformViewsTest.mm @@ -89,12 +89,6 @@ void OnPlatformViewSetAccessibilityFeatures(int32_t flags) override {} void OnPlatformViewRegisterTexture(std::shared_ptr texture) override {} void OnPlatformViewUnregisterTexture(int64_t texture_id) override {} void OnPlatformViewMarkTextureFrameAvailable(int64_t texture_id) override {} - - std::unique_ptr> ComputePlatformViewResolvedLocale( - const std::vector& supported_locale_data) override { - std::unique_ptr> out = std::make_unique>(); - return out; - } }; } // namespace diff --git a/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm b/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm index 7596578bd5e64..9edb7f08324fd 100644 --- a/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm +++ b/shell/platform/darwin/ios/framework/Source/accessibility_bridge_test.mm @@ -86,12 +86,6 @@ void OnPlatformViewSetAccessibilityFeatures(int32_t flags) override {} void OnPlatformViewRegisterTexture(std::shared_ptr texture) override {} void OnPlatformViewUnregisterTexture(int64_t texture_id) override {} void OnPlatformViewMarkTextureFrameAvailable(int64_t texture_id) override {} - - std::unique_ptr> ComputePlatformViewResolvedLocale( - const std::vector& supported_locale_data) override { - std::unique_ptr> out = std::make_unique>(); - return out; - } }; class MockIosDelegate : public AccessibilityBridge::IosDelegate {