OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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 CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/ui/fullscreen_exit_bubble.h" |
| 11 #include "views/controls/link_listener.h" |
| 12 |
| 13 namespace views { |
| 14 class View; |
| 15 class Widget; |
| 16 } |
| 17 |
| 18 // FullscreenExitBubbleViews is responsible for showing a bubble atop the |
| 19 // screen in fullscreen mode, telling users how to exit and providing a click |
| 20 // target. The bubble auto-hides, and re-shows when the user moves to the |
| 21 // screen top. |
| 22 class FullscreenExitBubbleViews : public views::LinkListener, |
| 23 public FullscreenExitBubble { |
| 24 public: |
| 25 FullscreenExitBubbleViews( |
| 26 views::Widget* frame, |
| 27 CommandUpdater::CommandUpdaterDelegate* delegate); |
| 28 virtual ~FullscreenExitBubbleViews(); |
| 29 |
| 30 protected: |
| 31 // FullScreenExitBubble |
| 32 virtual gfx::Rect GetPopupRect(bool ignore_animation_state) const OVERRIDE; |
| 33 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; |
| 34 virtual bool WindowContainsPoint(gfx::Point pos) OVERRIDE; |
| 35 virtual bool IsWindowActive() OVERRIDE; |
| 36 virtual void Hide() OVERRIDE; |
| 37 virtual void Show() OVERRIDE; |
| 38 virtual bool IsAnimating() OVERRIDE; |
| 39 |
| 40 private: |
| 41 class FullscreenExitView; |
| 42 |
| 43 // views::LinkListener: |
| 44 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; |
| 45 |
| 46 // The root view containing us. |
| 47 views::View* root_view_; |
| 48 |
| 49 views::Widget* popup_; |
| 50 |
| 51 // Animation controlling sliding into/out of the top of the screen. |
| 52 scoped_ptr<ui::SlideAnimation> size_animation_; |
| 53 |
| 54 // ui::AnimationDelegate: |
| 55 void AnimationProgressed(const ui::Animation* animation); |
| 56 void AnimationEnded(const ui::Animation* animation); |
| 57 |
| 58 // The contents of the popup. |
| 59 FullscreenExitView* view_; |
| 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(FullscreenExitBubbleViews); |
| 62 }; |
| 63 |
| 64 #endif // CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_ |
OLD | NEW |