Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Unified Diff: ui/views/controls/menu/native_menu_win.cc

Issue 9966007: views: Extract SystemMenuModel from native_menu_win.*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include string16 Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/native_menu_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/native_menu_win.cc
diff --git a/ui/views/controls/menu/native_menu_win.cc b/ui/views/controls/menu/native_menu_win.cc
index aa4adbde1ca7f1a795fd0247b8e720a5f7f4b7e2..1d518eac3f5e9090758dd4154e3656a3aaac1f16 100644
--- a/ui/views/controls/menu/native_menu_win.cc
+++ b/ui/views/controls/menu/native_menu_win.cc
@@ -17,6 +17,7 @@
#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/l10n/l10n_util_win.h"
+#include "ui/base/models/menu_model.h"
#include "ui/base/win/hwnd_util.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
@@ -739,21 +740,6 @@ void NativeMenuWin::CreateHostWindow() {
}
////////////////////////////////////////////////////////////////////////////////
-// SystemMenuModel:
-
-SystemMenuModel::SystemMenuModel(ui::SimpleMenuModel::Delegate* delegate)
- : SimpleMenuModel(delegate) {
-}
-
-SystemMenuModel::~SystemMenuModel() {
-}
-
-int SystemMenuModel::GetFirstItemIndex(gfx::NativeMenu native_menu) const {
- // We allow insertions before last item (Close).
- return std::max(0, GetMenuItemCount(native_menu) - 1);
-}
-
-////////////////////////////////////////////////////////////////////////////////
// MenuWrapper, public:
// static
« no previous file with comments | « ui/views/controls/menu/native_menu_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698