Update to Chromium version 84.0.4147.0 (#768962)

This commit is contained in:
Alexander Guettler
2020-06-09 13:48:00 -04:00
committed by Marshall Greenblatt
parent 640cd0f411
commit 790d248111
112 changed files with 756 additions and 713 deletions

View File

@@ -6,6 +6,25 @@
#include "libcef/browser/thread_util.h"
namespace {
static int CefCommandIdToChromeId(cef_text_field_commands_t command_id) {
switch (command_id) {
case cef_text_field_commands_t::CEF_TFC_CUT:
return views::Textfield::kCut;
case cef_text_field_commands_t::CEF_TFC_COPY:
return views::Textfield::kCopy;
case cef_text_field_commands_t::CEF_TFC_PASTE:
return views::Textfield::kPaste;
case cef_text_field_commands_t::CEF_TFC_UNDO:
return views::Textfield::kUndo;
case cef_text_field_commands_t::CEF_TFC_DELETE:
return views::Textfield::kDelete;
case cef_text_field_commands_t::CEF_TFC_SELECT_ALL:
return views::Textfield::kSelectAll;
}
}
} // namespace
// static
CefRefPtr<CefTextfield> CefTextfield::CreateTextfield(
CefRefPtr<CefTextfieldDelegate> delegate) {
@@ -154,15 +173,16 @@ void CefTextfieldImpl::ApplyTextStyle(cef_text_style_t style,
}
}
bool CefTextfieldImpl::IsCommandEnabled(int command_id) {
bool CefTextfieldImpl::IsCommandEnabled(cef_text_field_commands_t command_id) {
CEF_REQUIRE_VALID_RETURN(false);
return root_view()->IsCommandIdEnabled(command_id);
return root_view()->IsCommandIdEnabled(CefCommandIdToChromeId(command_id));
}
void CefTextfieldImpl::ExecuteCommand(int command_id) {
void CefTextfieldImpl::ExecuteCommand(cef_text_field_commands_t command_id) {
CEF_REQUIRE_VALID_RETURN_VOID();
if (root_view()->IsCommandIdEnabled(command_id))
root_view()->ExecuteCommand(command_id, ui::EF_NONE);
if (root_view()->IsCommandIdEnabled(CefCommandIdToChromeId(command_id)))
root_view()->ExecuteCommand(CefCommandIdToChromeId(command_id),
ui::EF_NONE);
}
void CefTextfieldImpl::ClearEditHistory() {