Commit e6dfd509 authored by Alex Newcomer's avatar Alex Newcomer Committed by Commit Bot

cros: Touchable app context menu dead code cleanup

More cleanups, this is just within ash, not within app_list or shelf.

Bug: 906684
Change-Id: I42b6a0b6765481685a1ec5e612b4d849f8f3f0ff
Reviewed-on: https://chromium-review.googlesource.com/c/1342766Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Alex Newcomer <newcomer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609525}
parent 008a0baf
......@@ -72,7 +72,6 @@
#include "ui/aura/window_observer.h"
#include "ui/aura/window_tracker.h"
#include "ui/base/models/menu_model.h"
#include "ui/base/ui_base_features.h"
#include "ui/compositor/layer.h"
#include "ui/display/types/display_constants.h"
#include "ui/events/event_utils.h"
......@@ -632,20 +631,17 @@ void RootWindowController::ShowContextMenu(const gfx::Point& location_in_screen,
UMA_HISTOGRAM_ENUMERATION("Apps.ContextMenuShowSource.Desktop", source_type,
ui::MENU_SOURCE_TYPE_LAST);
int run_types = views::MenuRunner::CONTEXT_MENU;
views::MenuAnchorPosition anchor_position = views::MENU_ANCHOR_TOPLEFT;
if (::features::IsTouchableAppContextMenuEnabled()) {
run_types |= views::MenuRunner::USE_TOUCHABLE_LAYOUT |
views::MenuRunner::FIXED_ANCHOR;
anchor_position = views::MENU_ANCHOR_BUBBLE_TOUCHABLE_ABOVE;
}
menu_runner_ = std::make_unique<views::MenuRunner>(
menu_model_.get(), run_types,
menu_model_.get(),
views::MenuRunner::CONTEXT_MENU |
views::MenuRunner::USE_TOUCHABLE_LAYOUT |
views::MenuRunner::FIXED_ANCHOR,
base::Bind(&RootWindowController::OnMenuClosed, base::Unretained(this),
base::TimeTicks::Now()));
menu_runner_->RunMenuAt(wallpaper_widget_controller()->GetWidget(), nullptr,
gfx::Rect(location_in_screen, gfx::Size()),
anchor_position, source_type);
views::MENU_ANCHOR_BUBBLE_TOUCHABLE_ABOVE,
source_type);
}
void RootWindowController::HideContextMenu() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment