Add Search Service in Enhanced Bookmark Bridge
[chromium-blink-merge.git] / ash / wm / overview / transparent_activate_window_button.h
bloba0fd4d9185457846a6cc197748f21a1a1f63edfe
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 "ui/views/controls/button/button.h"
11 namespace ash {
13 // Transparent window that covers window selector items and handles mouse and
14 // gestures on overview mode for them.
15 class TransparentActivateWindowButton : public views::ButtonListener {
16 public:
17 explicit TransparentActivateWindowButton(aura::Window* activate_window);
18 ~TransparentActivateWindowButton() override;
20 // Sets the bounds of the transparent window.
21 void SetBounds(const gfx::Rect& bounds);
23 // Sends an a11y focus alert so that if chromevox is enabled, the window title
24 // is read.
25 void SendFocusAlert() const;
27 // views::ButtonListener:
28 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
30 private:
31 // The transparent window event handler widget itself.
32 scoped_ptr<views::Widget> event_handler_widget_;
34 // Pointer to the window that the button activates.
35 aura::Window* activate_window_;
37 DISALLOW_COPY_AND_ASSIGN(TransparentActivateWindowButton);
40 } // namespace ash
42 #endif // ASH_WM_OVERVIEW_TRANSPARENT_ACTIVATE_WINDOW_BUTTON_H_