mirror of
https://github.com/electron/electron.git
synced 2026-02-14 00:55:19 -05:00
2757472: Reland "Reland "[LSC] Remove base::string16 alias""
https://chromium-review.googlesource.com/c/chromium/src/+/2757472
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
namespace electron {
|
||||
|
||||
SubmenuButton::SubmenuButton(PressedCallback callback,
|
||||
const base::string16& title,
|
||||
const std::u16string& title,
|
||||
const SkColor& background_color)
|
||||
: views::MenuButton(callback, gfx::RemoveAccelerator(title)),
|
||||
background_color_(background_color) {
|
||||
@@ -89,12 +89,12 @@ void SubmenuButton::PaintButtonContents(gfx::Canvas* canvas) {
|
||||
}
|
||||
}
|
||||
|
||||
bool SubmenuButton::GetUnderlinePosition(const base::string16& text,
|
||||
bool SubmenuButton::GetUnderlinePosition(const std::u16string& text,
|
||||
char16_t* accelerator,
|
||||
int* start,
|
||||
int* end) const {
|
||||
int pos, span;
|
||||
base::string16 trimmed =
|
||||
std::u16string trimmed =
|
||||
gfx::LocateAndRemoveAcceleratorChar(text, &pos, &span);
|
||||
if (pos > -1 && span != 0) {
|
||||
*accelerator = base::ToUpperASCII(trimmed[pos]);
|
||||
@@ -106,7 +106,7 @@ bool SubmenuButton::GetUnderlinePosition(const base::string16& text,
|
||||
return false;
|
||||
}
|
||||
|
||||
void SubmenuButton::GetCharacterPosition(const base::string16& text,
|
||||
void SubmenuButton::GetCharacterPosition(const std::u16string& text,
|
||||
int index,
|
||||
int* pos) const {
|
||||
int height = 0;
|
||||
|
||||
Reference in New Issue
Block a user