Skip to content

Commit

Permalink
[glfw] Implement SystemNavigator.pop (flutter#9365)
Browse files Browse the repository at this point in the history
* [glfw] Implement SystemNavigator.pop

* Exit the program

* Add success result
  • Loading branch information
franciscojma86 authored Jun 20, 2019
1 parent 9b130a4 commit e6d3552
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shell/platform/glfw/platform_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit e6d3552

Please sign in to comment.