diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-14 15:49:40 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-14 15:49:40 +0000 |
commit | 44cbd9e3734527f73a83f8a864be0bb5ccae0a7a (patch) | |
tree | a997fb0565558d63e0eab62b631ef984de3e9596 /views/controls/menu/native_menu_win.cc | |
parent | 0c1c047d641a599ffffa280ab50d564cedb3e436 (diff) | |
download | chromium_src-44cbd9e3734527f73a83f8a864be0bb5ccae0a7a.zip chromium_src-44cbd9e3734527f73a83f8a864be0bb5ccae0a7a.tar.gz chromium_src-44cbd9e3734527f73a83f8a864be0bb5ccae0a7a.tar.bz2 |
Move models from app to ui/base/models
BUG=none
TEST=none
TBR=brettw
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71446 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/menu/native_menu_win.cc')
-rw-r--r-- | views/controls/menu/native_menu_win.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/views/controls/menu/native_menu_win.cc b/views/controls/menu/native_menu_win.cc index efdaa67..687e932 100644 --- a/views/controls/menu/native_menu_win.cc +++ b/views/controls/menu/native_menu_win.cc @@ -121,7 +121,7 @@ class NativeMenuWin::MenuHostWindow { // Called when the user selects a specific item. void OnMenuCommand(int position, HMENU menu) { NativeMenuWin* intergoat = GetNativeMenuWinFromHMENU(menu); - menus::MenuModel* model = intergoat->model_; + ui::MenuModel* model = intergoat->model_; model->ActivatedAt(position); } @@ -297,7 +297,7 @@ const wchar_t* NativeMenuWin::MenuHostWindow::kWindowClassName = //////////////////////////////////////////////////////////////////////////////// // NativeMenuWin, public: -NativeMenuWin::NativeMenuWin(menus::MenuModel* model, HWND system_menu_for) +NativeMenuWin::NativeMenuWin(ui::MenuModel* model, HWND system_menu_for) : model_(model), menu_(NULL), owner_draw_(l10n_util::NeedOverrideDefaultUIFont(NULL, NULL) && @@ -357,7 +357,7 @@ void NativeMenuWin::Rebuild() { for (int menu_index = first_item_index_; menu_index < first_item_index_ + model_->GetItemCount(); ++menu_index) { int model_index = menu_index - first_item_index_; - if (model_->GetTypeAt(model_index) == menus::MenuModel::TYPE_SEPARATOR) + if (model_->GetTypeAt(model_index) == ui::MenuModel::TYPE_SEPARATOR) AddSeparatorItemAt(menu_index, model_index); else AddMenuItemAt(menu_index, model_index); @@ -486,13 +486,13 @@ void NativeMenuWin::AddMenuItemAt(int menu_index, int model_index) { ItemData* item_data = new ItemData; item_data->label = std::wstring(); - menus::MenuModel::ItemType type = model_->GetTypeAt(model_index); - if (type == menus::MenuModel::TYPE_SUBMENU) { + ui::MenuModel::ItemType type = model_->GetTypeAt(model_index); + if (type == ui::MenuModel::TYPE_SUBMENU) { item_data->submenu.reset(new Menu2(model_->GetSubmenuModelAt(model_index))); mii.fMask |= MIIM_SUBMENU; mii.hSubMenu = item_data->submenu->GetNativeMenu(); } else { - if (type == menus::MenuModel::TYPE_RADIO) + if (type == ui::MenuModel::TYPE_RADIO) mii.fType |= MFT_RADIOCHECK; mii.wID = model_->GetCommandIdAt(model_index); } @@ -551,8 +551,8 @@ void NativeMenuWin::UpdateMenuItemInfoForString( int model_index, const std::wstring& label) { std::wstring formatted = label; - menus::MenuModel::ItemType type = model_->GetTypeAt(model_index); - if (type != menus::MenuModel::TYPE_SUBMENU) { + ui::MenuModel::ItemType type = model_->GetTypeAt(model_index); + if (type != ui::MenuModel::TYPE_SUBMENU) { // Add accelerator details to the label if provided. views::Accelerator accelerator(ui::VKEY_UNKNOWN, false, false, false); if (model_->GetAcceleratorAt(model_index, &accelerator)) { @@ -612,7 +612,7 @@ void NativeMenuWin::CreateHostWindow() { //////////////////////////////////////////////////////////////////////////////// // SystemMenuModel: -SystemMenuModel::SystemMenuModel(menus::SimpleMenuModel::Delegate* delegate) +SystemMenuModel::SystemMenuModel(ui::SimpleMenuModel::Delegate* delegate) : SimpleMenuModel(delegate) { } |