Put WeakPtrFactory member last in USBEventRouter
[chromium-blink-merge.git] / ash / wm / overview / transparent_activate_window_button.h
blob0fe374732cd1058ece4b6b1d4b27b38d73b48acb
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"
13 namespace aura {
14 class Window;
15 } // namespace aura
17 namespace views {
18 class Button;
19 class Widget;
20 } // namespace views
22 namespace ash {
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 {
29 public:
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);
48 private:
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);
58 } // namespace ash
60 #endif // ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_H_