emoji_panel_helper_lacros.cc 701 B

123456789101112131415161718192021
  1. // Copyright 2022 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. #include "ui/base/emoji/emoji_panel_helper.h"
  5. #include "chromeos/crosapi/mojom/emoji_picker.mojom.h"
  6. #include "chromeos/lacros/lacros_service.h"
  7. namespace ui {
  8. bool IsEmojiPanelSupported() {
  9. return chromeos::LacrosService::Get()
  10. ->IsAvailable<crosapi::mojom::EmojiPicker>();
  11. }
  12. void ShowEmojiPanel() {
  13. auto* lacros_service = chromeos::LacrosService::Get();
  14. if (lacros_service->IsAvailable<crosapi::mojom::EmojiPicker>())
  15. lacros_service->GetRemote<crosapi::mojom::EmojiPicker>()->ShowEmojiPicker();
  16. } // namespace ui