parent
86d23cee40
commit
22d8f22cfb
100 changed files with 417 additions and 417 deletions
|
@ -37,7 +37,7 @@ class AutofillPopup;
|
|||
// by |AutofillPopupViewViews|.
|
||||
class AutofillPopupChildView : public views::View {
|
||||
public:
|
||||
explicit AutofillPopupChildView(const base::string16& suggestion)
|
||||
explicit AutofillPopupChildView(const std::u16string& suggestion)
|
||||
: suggestion_(suggestion) {
|
||||
SetFocusBehavior(FocusBehavior::ALWAYS);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ class AutofillPopupChildView : public views::View {
|
|||
// views::Views implementation
|
||||
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
|
||||
|
||||
base::string16 suggestion_;
|
||||
std::u16string suggestion_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AutofillPopupChildView);
|
||||
};
|
||||
|
|
|
@ -47,8 +47,8 @@ bool ViewsDelegate::GetSavedWindowPlacement(
|
|||
return false;
|
||||
}
|
||||
|
||||
void ViewsDelegate::NotifyMenuItemFocused(const base::string16& menu_name,
|
||||
const base::string16& menu_item_name,
|
||||
void ViewsDelegate::NotifyMenuItemFocused(const std::u16string& menu_name,
|
||||
const std::u16string& menu_item_name,
|
||||
int item_index,
|
||||
int item_count,
|
||||
bool has_submenu) {}
|
||||
|
|
|
@ -29,8 +29,8 @@ class ViewsDelegate : public views::ViewsDelegate {
|
|||
const std::string& window_name,
|
||||
gfx::Rect* bounds,
|
||||
ui::WindowShowState* show_state) const override;
|
||||
void NotifyMenuItemFocused(const base::string16& menu_name,
|
||||
const base::string16& menu_item_name,
|
||||
void NotifyMenuItemFocused(const std::u16string& menu_name,
|
||||
const std::u16string& menu_item_name,
|
||||
int item_index,
|
||||
int item_count,
|
||||
bool has_submenu) override;
|
||||
|
|
|
@ -297,7 +297,7 @@ void GlobalMenuBarX11::RegisterAccelerator(DbusmenuMenuitem* item,
|
|||
NOTIMPLEMENTED();
|
||||
return;
|
||||
}
|
||||
std::string name = base::UTF16ToUTF8(base::string16(1, keysym));
|
||||
std::string name = base::UTF16ToUTF8(std::u16string(1, keysym));
|
||||
g_variant_builder_add(&builder, "s", name.c_str());
|
||||
|
||||
GVariant* inside_array = g_variant_builder_end(&builder);
|
||||
|
|
|
@ -46,7 +46,7 @@ class DevToolsWindowDelegate : public views::ClientView,
|
|||
bool CanResize() const override { return true; }
|
||||
bool CanMaximize() const override { return true; }
|
||||
bool CanMinimize() const override { return true; }
|
||||
base::string16 GetWindowTitle() const override { return shell_->GetTitle(); }
|
||||
std::u16string GetWindowTitle() const override { return shell_->GetTitle(); }
|
||||
gfx::ImageSkia GetWindowAppIcon() override { return GetWindowIcon(); }
|
||||
gfx::ImageSkia GetWindowIcon() override { return icon_; }
|
||||
views::Widget* GetWidget() override { return widget_; }
|
||||
|
@ -202,7 +202,7 @@ void InspectableWebContentsViewViews::SetContentsResizingStrategy(
|
|||
Layout();
|
||||
}
|
||||
|
||||
void InspectableWebContentsViewViews::SetTitle(const base::string16& title) {
|
||||
void InspectableWebContentsViewViews::SetTitle(const std::u16string& title) {
|
||||
if (devtools_window_) {
|
||||
title_ = title;
|
||||
devtools_window_->UpdateWindowTitle();
|
||||
|
|
|
@ -39,13 +39,13 @@ class InspectableWebContentsViewViews : public InspectableWebContentsView,
|
|||
void SetIsDocked(bool docked, bool activate) override;
|
||||
void SetContentsResizingStrategy(
|
||||
const DevToolsContentsResizingStrategy& strategy) override;
|
||||
void SetTitle(const base::string16& title) override;
|
||||
void SetTitle(const std::u16string& title) override;
|
||||
|
||||
InspectableWebContents* inspectable_web_contents() {
|
||||
return inspectable_web_contents_;
|
||||
}
|
||||
|
||||
const base::string16& GetTitle() const { return title_; }
|
||||
const std::u16string& GetTitle() const { return title_; }
|
||||
|
||||
private:
|
||||
// views::View:
|
||||
|
@ -62,7 +62,7 @@ class InspectableWebContentsViewViews : public InspectableWebContentsView,
|
|||
DevToolsContentsResizingStrategy strategy_;
|
||||
bool devtools_visible_ = false;
|
||||
views::WidgetDelegate* devtools_window_delegate_ = nullptr;
|
||||
base::string16 title_;
|
||||
std::u16string title_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsViewViews);
|
||||
};
|
||||
|
|
|
@ -70,7 +70,7 @@ bool MenuDelegate::GetAccelerator(int id, ui::Accelerator* accelerator) const {
|
|||
return adapter_->GetAccelerator(id, accelerator);
|
||||
}
|
||||
|
||||
base::string16 MenuDelegate::GetLabel(int id) const {
|
||||
std::u16string MenuDelegate::GetLabel(int id) const {
|
||||
return adapter_->GetLabel(id);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class MenuDelegate : public views::MenuDelegate {
|
|||
bool IsTriggerableEvent(views::MenuItemView* source,
|
||||
const ui::Event& e) override;
|
||||
bool GetAccelerator(int id, ui::Accelerator* accelerator) const override;
|
||||
base::string16 GetLabel(int id) const override;
|
||||
std::u16string GetLabel(int id) const override;
|
||||
void GetLabelStyle(int id, LabelStyle* style) const override;
|
||||
bool IsCommandEnabled(int id) const override;
|
||||
bool IsCommandVisible(int id) const override;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace electron {
|
|||
class SubmenuButton : public views::MenuButton {
|
||||
public:
|
||||
SubmenuButton(PressedCallback callback,
|
||||
const base::string16& title,
|
||||
const std::u16string& title,
|
||||
const SkColor& background_color);
|
||||
~SubmenuButton() override;
|
||||
|
||||
|
@ -36,11 +36,11 @@ class SubmenuButton : public views::MenuButton {
|
|||
std::unique_ptr<views::InkDrop> CreateInkDrop() override;
|
||||
|
||||
private:
|
||||
bool GetUnderlinePosition(const base::string16& text,
|
||||
bool GetUnderlinePosition(const std::u16string& text,
|
||||
char16_t* accelerator,
|
||||
int* start,
|
||||
int* end) const;
|
||||
void GetCharacterPosition(const base::string16& text,
|
||||
void GetCharacterPosition(const std::u16string& text,
|
||||
int index,
|
||||
int* pos) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue