1 // Copyright 2015 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.
5 #ifndef UI_VIEWS_TOUCHUI_TOUCH_SELECTION_MENU_RUNNER_VIEWS_H_
6 #define UI_VIEWS_TOUCHUI_TOUCH_SELECTION_MENU_RUNNER_VIEWS_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/touch_selection/touch_selection_menu_runner.h"
10 #include "ui/views/views_export.h"
14 // Views implementation for TouchSelectionMenuRunner.
15 class VIEWS_EXPORT TouchSelectionMenuRunnerViews
16 : public ui::TouchSelectionMenuRunner
{
18 TouchSelectionMenuRunnerViews();
19 ~TouchSelectionMenuRunnerViews() override
;
22 friend class TouchSelectionMenuRunnerViewsTest
;
26 gfx::Rect
GetAnchorRectForTest() const;
28 // ui::TouchSelectionMenuRunner:
29 void OpenMenu(ui::TouchSelectionMenuClient
* client
,
30 const gfx::Rect
& anchor_rect
,
31 const gfx::Size
& handle_image_size
,
32 aura::Window
* context
) override
;
33 void CloseMenu() override
;
34 bool IsRunning() const override
;
36 // A pointer to the currently running menu, or |nullptr| if no menu is
37 // running. The menu manages its own lifetime and deletes itself when closed.
40 DISALLOW_COPY_AND_ASSIGN(TouchSelectionMenuRunnerViews
);
45 #endif // UI_VIEWS_TOUCHUI_TOUCH_SELECTION_MENU_RUNNER_VIEWS_H_