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

Side by Side Diff: chrome/browser/ui/views/frame/system_menu_model.cc

Issue 11791039: Removes SimpleMenuModel::FlipIndex. It was only used by (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/frame/system_menu_model.h ('k') | ui/base/models/menu_model.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/frame/system_menu_model.h" 5 #include "chrome/browser/ui/views/frame/system_menu_model.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 SystemMenuModel::SystemMenuModel(ui::SimpleMenuModel::Delegate* delegate) 11 SystemMenuModel::SystemMenuModel(ui::SimpleMenuModel::Delegate* delegate)
12 : ui::SimpleMenuModel(delegate) { 12 : ui::SimpleMenuModel(delegate) {
13 } 13 }
14 14
15 SystemMenuModel::~SystemMenuModel() { 15 SystemMenuModel::~SystemMenuModel() {
16 } 16 }
17 17
18 int SystemMenuModel::GetFirstItemIndex(gfx::NativeMenu native_menu) const { 18 int SystemMenuModel::GetFirstItemIndex(gfx::NativeMenu native_menu) const {
19 // We allow insertions before last item (Close). 19 // We allow insertions before last item (Close).
20 return std::max(0, GetMenuItemCount(native_menu) - 1); 20 return std::max(0, GetMenuItemCount(native_menu) - 1);
21 } 21 }
22
23 int SystemMenuModel::FlipIndex(int index) const {
24 return GetItemCount() - index - 1;
25 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/system_menu_model.h ('k') | ui/base/models/menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698