<commit_before>// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "views/controls/menu/menu_controller.h"

#include "app/l10n_util.h"
#include "app/os_exchange_data.h"
#include "base/i18n/rtl.h"
#include "base/keyboard_codes.h"
#include "base/time.h"
#include "gfx/canvas_skia.h"
#include "views/controls/button/menu_button.h"
#include "views/controls/menu/menu_scroll_view_container.h"
#include "views/controls/menu/submenu_view.h"
#include "views/drag_utils.h"
#include "views/screen.h"
#include "views/view_constants.h"
#include "views/views_delegate.h"
#include "views/widget/root_view.h"
#include "views/widget/widget.h"

#if defined(OS_LINUX)
#include "base/keyboard_code_conversion_gtk.h"
#endif

using base::Time;
using base::TimeDelta;

// Period of the scroll timer (in milliseconds).
static const int kScrollTimerMS = 30;

// Delay, in ms, between when menus are selected are moused over and the menu
// appears.
static const int kShowDelay = 400;

// Amount of time from when the drop exits the menu and the menu is hidden.
static const int kCloseOnExitTime = 1200;

// Max width of a menu. There does not appear to be an OS value for this, yet
// both IE and FF restrict the max width of a menu.
static const int kMaxMenuWidth = 400;

// Amount to inset submenus.
static const int kSubmenuHorizontalInset = 3;

namespace views {<commit_msg>Ups the max size of bookmark menus to accommodate the wrench menu.<commit_after>// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "views/controls/menu/menu_controller.h"

#include "app/l10n_util.h"
#include "app/os_exchange_data.h"
#include "base/i18n/rtl.h"
#include "base/keyboard_codes.h"
#include "base/time.h"
#include "gfx/canvas_skia.h"
#include "views/controls/button/menu_button.h"
#include "views/controls/menu/menu_scroll_view_container.h"
#include "views/controls/menu/submenu_view.h"
#include "views/drag_utils.h"
#include "views/screen.h"
#include "views/view_constants.h"
#include "views/views_delegate.h"
#include "views/widget/root_view.h"
#include "views/widget/widget.h"

#if defined(OS_LINUX)
#include "base/keyboard_code_conversion_gtk.h"
#endif

using base::Time;
using base::TimeDelta;

// Period of the scroll timer (in milliseconds).
static const int kScrollTimerMS = 30;

// Delay, in ms, between when menus are selected are moused over and the menu
// appears.
static const int kShowDelay = 400;

// Amount of time from when the drop exits the menu and the menu is hidden.
static const int kCloseOnExitTime = 1200;

// Max width of a menu. There does not appear to be an OS value for this, yet
// both IE and FF restrict the max width of a menu.
// NOTE: this needs to be large enough to accommodate the wrench menu with big
// fonts.
static const int kMaxMenuWidth = 800;

// Amount to inset submenus.
static const int kSubmenuHorizontalInset = 3;

namespace views {
{'fraction_non_alphanumeric': 0.10341494845360824, 'fraction_numerical': 0.013530927835051547, 'mean_word_length': 4.495575221238938, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7472423', 'n_tokens_mistral': 1061, 'n_tokens_neox': 1002, 'n_words': 358}