OLD | NEW |
| (Empty) |
1 // Copyright 2014 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. | |
4 | |
5 #ifndef ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_H_ | |
6 #define ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "base/strings/string16.h" | |
11 #include "ui/gfx/geometry/rect.h" | |
12 | |
13 namespace aura { | |
14 class Window; | |
15 } // namespace aura | |
16 | |
17 namespace views { | |
18 class Button; | |
19 class Widget; | |
20 } // namespace views | |
21 | |
22 namespace ash { | |
23 | |
24 class TransparentActivateWindowButtonDelegate; | |
25 | |
26 // Transparent window that covers window selector items and handles mouse and | |
27 // gestures on overview mode for them. | |
28 class TransparentActivateWindowButton { | |
29 public: | |
30 TransparentActivateWindowButton( | |
31 aura::Window* root_window, | |
32 TransparentActivateWindowButtonDelegate* delegate); | |
33 ~TransparentActivateWindowButton(); | |
34 | |
35 // Sets the accessibility name. | |
36 void SetAccessibleName(const base::string16& name); | |
37 | |
38 // Sets the bounds of the transparent window. | |
39 void SetBounds(const gfx::Rect& bounds); | |
40 | |
41 // Sends an accessibility focus alert so that if chromevox is enabled, the | |
42 // window title is read. | |
43 void SendFocusAlert() const; | |
44 | |
45 private: | |
46 // The transparent window event handler widget itself. | |
47 scoped_ptr<views::Widget> event_handler_widget_; | |
48 | |
49 // The transparent button view that handles user input. Not owned. | |
50 views::Button* transparent_button_; | |
51 | |
52 DISALLOW_COPY_AND_ASSIGN(TransparentActivateWindowButton); | |
53 }; | |
54 | |
55 } // namespace ash | |
56 | |
57 #endif // ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_H_ | |
OLD | NEW |