From e6d3552216d8fbf73395dee91761a39fa7ff56e4 Mon Sep 17 00:00:00 2001 From: Francisco Magdaleno Date: Thu, 20 Jun 2019 09:55:12 -0700 Subject: [PATCH] [glfw] Implement SystemNavigator.pop (#9365) * [glfw] Implement SystemNavigator.pop * Exit the program * Add success result --- shell/platform/glfw/platform_handler.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shell/platform/glfw/platform_handler.cc b/shell/platform/glfw/platform_handler.cc index 5e9f41ed21f..39c8b4708cd 100644 --- a/shell/platform/glfw/platform_handler.cc +++ b/shell/platform/glfw/platform_handler.cc @@ -12,6 +12,7 @@ static constexpr char kChannelName[] = "flutter/platform"; static constexpr char kGetClipboardDataMethod[] = "Clipboard.getData"; static constexpr char kSetClipboardDataMethod[] = "Clipboard.setData"; +static constexpr char kSystemNavigatorPopMethod[] = "SystemNavigator.pop"; static constexpr char kTextPlainFormat[] = "text/plain"; static constexpr char kTextKey[] = "text"; @@ -73,6 +74,9 @@ void PlatformHandler::HandleMethodCall( } glfwSetClipboardString(window_, itr->value.GetString()); result->Success(); + } else if (method.compare(kSystemNavigatorPopMethod) == 0) { + exit(EXIT_SUCCESS); + result->Success(); } else { result->NotImplemented(); }