2752406: [LSC] Replace base::string16 with std::u16string in //ui
2752406
This commit is contained in:
parent
d4bec23bde
commit
9e336f5d0c
8 changed files with 15 additions and 15 deletions
|
@ -78,7 +78,7 @@ void MenuBar::SetAcceleratorVisibility(bool visible) {
|
|||
static_cast<SubmenuButton*>(child)->SetAcceleratorVisibility(visible);
|
||||
}
|
||||
|
||||
MenuBar::View* MenuBar::FindAccelChild(base::char16 key) {
|
||||
MenuBar::View* MenuBar::FindAccelChild(char16_t key) {
|
||||
for (auto* child : GetChildrenInZOrder()) {
|
||||
if (static_cast<SubmenuButton*>(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<SubmenuButton*>(child)->Activate(nullptr);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue