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

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

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/menu/menu_config.cc ('k') | ui/views/controls/menu/menu_config_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/menu/menu_config_aura.cc
diff --git a/ui/views/controls/menu/menu_config_aura.cc b/ui/views/controls/menu/menu_config_aura.cc
deleted file mode 100644
index 911e3fab6885831d60a8aa2993232b1e3308d2da..0000000000000000000000000000000000000000
--- a/ui/views/controls/menu/menu_config_aura.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2014 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 "ui/views/controls/menu/menu_config.h"
-
-#include "ui/base/layout.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/native_theme/native_theme_aura.h"
-#include "ui/resources/grit/ui_resources.h"
-#include "ui/views/controls/menu/menu_image_util.h"
-
-namespace views {
-
-namespace {
-#if defined(OS_CHROMEOS)
-static const int kMenuCornerRadiusForAura = 2;
-#else
-static const int kMenuCornerRadiusForAura = 0;
-#endif
-} // namespace
-
-#if !defined(OS_WIN)
-void MenuConfig::Init(const ui::NativeTheme* theme) {
- if (theme == ui::NativeThemeAura::instance())
- InitAura(theme);
-}
-#endif
-
-void MenuConfig::InitAura(const ui::NativeTheme* theme) {
- submenu_horizontal_inset = 1;
- arrow_to_edge_padding = 20;
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- arrow_width = rb.GetImageNamed(IDR_MENU_HIERARCHY_ARROW).Width();
- gfx::ImageSkia check = GetMenuCheckImage(false);
- check_height = check.height();
- item_min_height = 29;
- separator_spacing_height = 7;
- separator_lower_height = 8;
- separator_upper_height = 8;
- label_to_arrow_padding = 20;
- label_to_minor_text_padding = 20;
- always_use_icon_to_label_padding = true;
- align_arrow_and_shortcut = true;
- offset_context_menus = true;
- corner_radius = kMenuCornerRadiusForAura;
-}
-
-#if !defined(OS_WIN)
-// static
-const MenuConfig& MenuConfig::instance(const ui::NativeTheme* theme) {
- static MenuConfig* views_instance = NULL;
- if (!views_instance)
- views_instance = new MenuConfig(theme ?
- theme : ui::NativeTheme::instance());
- return *views_instance;
-}
-#endif
-
-} // namespace views
« no previous file with comments | « ui/views/controls/menu/menu_config.cc ('k') | ui/views/controls/menu/menu_config_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698