system_menu_insertion_delegate_win.cc revision c2e0dbddbe15c98d52c4786dac06cb8952a8ae6d
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 3// found in the LICENSE file. 4 5#include "chrome/browser/ui/views/frame/system_menu_insertion_delegate_win.h" 6 7#include <Windowsx.h> 8 9#include <algorithm> 10 11int SystemMenuInsertionDelegateWin::GetInsertionIndex(HMENU native_menu) { 12 return std::max(0, GetMenuItemCount(native_menu) - 1); 13} 14