Linux: Use Aura to display context menus (issue #1258)

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1710 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2014-05-23 17:47:07 +00:00
parent aeb1aa7b52
commit 79bd4dd93c
11 changed files with 423 additions and 301 deletions

View File

@ -65,7 +65,7 @@ class CefSimpleMenuModel : public ui::MenuModel {
}
virtual base::string16 GetLabelAt(int index) const OVERRIDE {
return impl_->GetLabelAt(index).ToString16();
return impl_->GetFormattedLabelAt(index);
}
virtual bool IsItemDynamicAt(int index) const OVERRIDE {
@ -641,6 +641,12 @@ void CefMenuModelImpl::MenuClosed() {
base::Bind(&CefMenuModelImpl::OnMenuClosed, this));
}
base::string16 CefMenuModelImpl::GetFormattedLabelAt(int index) {
base::string16 label = GetLabelAt(index).ToString16();
delegate_->FormatLabel(label);
return label;
}
bool CefMenuModelImpl::VerifyRefCount() {
if (!VerifyContext())
return false;