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.
5 #ifndef ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_H_
6 #define ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_H_
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"
24 class TransparentActivateWindowButtonDelegate
;
26 // Transparent window that covers window selector items and handles mouse and
27 // gestures on overview mode for them.
28 class TransparentActivateWindowButton
{
30 TransparentActivateWindowButton(
31 aura::Window
* root_window
,
32 TransparentActivateWindowButtonDelegate
* delegate
);
33 ~TransparentActivateWindowButton();
35 // Sets the accessibility name.
36 void SetAccessibleName(const base::string16
& name
);
38 // Sets the bounds of the transparent window.
39 void SetBounds(const gfx::Rect
& bounds
);
41 // Sends an accessibility focus alert so that if chromevox is enabled, the
42 // window title is read.
43 void SendFocusAlert() const;
45 // Stacks |this| above |activate_button| in the window z-ordering.
46 void StackAbove(TransparentActivateWindowButton
* activate_button
);
49 // The transparent window event handler widget itself.
50 scoped_ptr
<views::Widget
> event_handler_widget_
;
52 // The transparent button view that handles user input. Not owned.
53 views::Button
* transparent_button_
;
55 DISALLOW_COPY_AND_ASSIGN(TransparentActivateWindowButton
);
60 #endif // ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_H_