Add ICU message format support
[chromium-blink-merge.git] / ui / views / touchui / touch_selection_menu_runner_views.h
blob46032ee608e2b6b85c6bfd0b0710efb63f3a0551
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"
12 namespace views {
14 // Views implementation for TouchSelectionMenuRunner.
15 class VIEWS_EXPORT TouchSelectionMenuRunnerViews
16 : public ui::TouchSelectionMenuRunner {
17 public:
18 TouchSelectionMenuRunnerViews();
19 ~TouchSelectionMenuRunnerViews() override;
21 private:
22 friend class TouchSelectionMenuRunnerViewsTest;
23 class Menu;
25 // Helper for tests.
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.
38 Menu* menu_;
40 DISALLOW_COPY_AND_ASSIGN(TouchSelectionMenuRunnerViews);
43 } // namespace views
45 #endif // UI_VIEWS_TOUCHUI_TOUCH_SELECTION_MENU_RUNNER_VIEWS_H_