diff --git a/shell/browser/ui/views/menu_bar.cc b/shell/browser/ui/views/menu_bar.cc index fe4ed9f7ac1e..a55a8128dbd9 100644 --- a/shell/browser/ui/views/menu_bar.cc +++ b/shell/browser/ui/views/menu_bar.cc @@ -78,7 +78,7 @@ void MenuBar::SetAcceleratorVisibility(bool visible) { static_cast(child)->SetAcceleratorVisibility(visible); } -MenuBar::View* MenuBar::FindAccelChild(base::char16 key) { +MenuBar::View* MenuBar::FindAccelChild(char16_t key) { for (auto* child : GetChildrenInZOrder()) { if (static_cast(child)->accelerator() == key) return child; @@ -86,11 +86,11 @@ MenuBar::View* MenuBar::FindAccelChild(base::char16 key) { return nullptr; } -bool MenuBar::HasAccelerator(base::char16 key) { +bool MenuBar::HasAccelerator(char16_t key) { return FindAccelChild(key) != nullptr; } -void MenuBar::ActivateAccelerator(base::char16 key) { +void MenuBar::ActivateAccelerator(char16_t key) { auto* child = FindAccelChild(key); if (child) static_cast(child)->Activate(nullptr); diff --git a/shell/browser/ui/views/menu_bar.h b/shell/browser/ui/views/menu_bar.h index eb2e2d35ac57..1b2118381815 100644 --- a/shell/browser/ui/views/menu_bar.h +++ b/shell/browser/ui/views/menu_bar.h @@ -51,10 +51,10 @@ class MenuBar : public views::AccessiblePaneView, void SetAcceleratorVisibility(bool visible); // Returns true if the submenu has accelerator |key| - bool HasAccelerator(base::char16 key); + bool HasAccelerator(char16_t key); // Shows the submenu whose accelerator is |key|. - void ActivateAccelerator(base::char16 key); + void ActivateAccelerator(char16_t key); // Returns there are how many items in the root menu. int GetItemCount() const; @@ -95,7 +95,7 @@ class MenuBar : public views::AccessiblePaneView, RootView* window_ = nullptr; ElectronMenuModel* menu_model_ = nullptr; - View* FindAccelChild(base::char16 key); + View* FindAccelChild(char16_t key); bool has_focus_ = true; diff --git a/shell/browser/ui/views/submenu_button.cc b/shell/browser/ui/views/submenu_button.cc index 3e3c70356c25..89a51c8ed656 100644 --- a/shell/browser/ui/views/submenu_button.cc +++ b/shell/browser/ui/views/submenu_button.cc @@ -90,7 +90,7 @@ void SubmenuButton::PaintButtonContents(gfx::Canvas* canvas) { } bool SubmenuButton::GetUnderlinePosition(const base::string16& text, - base::char16* accelerator, + char16_t* accelerator, int* start, int* end) const { int pos, span; diff --git a/shell/browser/ui/views/submenu_button.h b/shell/browser/ui/views/submenu_button.h index a5685cd1b066..10344cd6842d 100644 --- a/shell/browser/ui/views/submenu_button.h +++ b/shell/browser/ui/views/submenu_button.h @@ -24,7 +24,7 @@ class SubmenuButton : public views::MenuButton { void SetAcceleratorVisibility(bool visible); void SetUnderlineColor(SkColor color); - base::char16 accelerator() const { return accelerator_; } + char16_t accelerator() const { return accelerator_; } void GetAccessibleNodeData(ui::AXNodeData* node_data) override; @@ -37,14 +37,14 @@ class SubmenuButton : public views::MenuButton { private: bool GetUnderlinePosition(const base::string16& text, - base::char16* accelerator, + char16_t* accelerator, int* start, int* end) const; void GetCharacterPosition(const base::string16& text, int index, int* pos) const; - base::char16 accelerator_ = 0; + char16_t accelerator_ = 0; bool show_underline_ = false; diff --git a/shell/common/gin_converters/blink_converter.cc b/shell/common/gin_converters/blink_converter.cc index c7cfb3a6be6b..e0316bab0cee 100644 --- a/shell/common/gin_converters/blink_converter.cc +++ b/shell/common/gin_converters/blink_converter.cc @@ -44,10 +44,10 @@ int VectorToBitArray(const std::vector& vec) { namespace gin { template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Handle val, - base::char16* out) { + char16_t* out) { base::string16 code = base::UTF8ToUTF16(gin::V8ToString(isolate, val)); if (code.length() != 1) return false; diff --git a/shell/common/keyboard_util.cc b/shell/common/keyboard_util.cc index dc77b9479379..c5dc82c540dc 100644 --- a/shell/common/keyboard_util.cc +++ b/shell/common/keyboard_util.cc @@ -138,7 +138,7 @@ ui::KeyboardCode KeyboardCodeFromKeyIdentifier(const std::string& s, } // namespace -ui::KeyboardCode KeyboardCodeFromCharCode(base::char16 c, bool* shifted) { +ui::KeyboardCode KeyboardCodeFromCharCode(char16_t c, bool* shifted) { c = base::ToLowerASCII(c); *shifted = false; switch (c) { diff --git a/shell/common/keyboard_util.h b/shell/common/keyboard_util.h index e444c327ce49..127c7bea1906 100644 --- a/shell/common/keyboard_util.h +++ b/shell/common/keyboard_util.h @@ -14,7 +14,7 @@ namespace electron { // Return key code of the char, and also determine whether the SHIFT key is // pressed. -ui::KeyboardCode KeyboardCodeFromCharCode(base::char16 c, bool* shifted); +ui::KeyboardCode KeyboardCodeFromCharCode(char16_t c, bool* shifted); // Return key code of the |str|, and also determine whether the SHIFT key is // pressed. diff --git a/shell/renderer/api/electron_api_spell_check_client.cc b/shell/renderer/api/electron_api_spell_check_client.cc index f978f5f1f7b1..24221be890d9 100644 --- a/shell/renderer/api/electron_api_spell_check_client.cc +++ b/shell/renderer/api/electron_api_spell_check_client.cc @@ -29,7 +29,7 @@ namespace api { namespace { bool HasWordCharacters(const base::string16& text, int index) { - const base::char16* data = text.data(); + const char16_t* data = text.data(); int length = text.length(); while (index < length) { uint32_t code = 0;