| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_insertion_delegate_win.h" | 5 #include "chrome/browser/ui/views/frame/system_menu_insertion_delegate_win.h" |
| 6 | 6 |
| 7 #include <Windowsx.h> | 7 #include <algorithm> |
| 8 | 8 |
| 9 int SystemMenuInsertionDelegateWin::GetInsertionIndex(HMENU native_menu) { | 9 int SystemMenuInsertionDelegateWin::GetInsertionIndex(HMENU native_menu) { |
| 10 return std::max(0, GetMenuItemCount(native_menu) - 1); | 10 return std::max(0, GetMenuItemCount(native_menu) - 1); |
| 11 } | 11 } |
| OLD | NEW |