Chromium Code Reviews| Index: chrome/browser/ui/views/fullscreen_exit_bubble_views.h |
| diff --git a/chrome/browser/ui/views/fullscreen_exit_bubble_views.h b/chrome/browser/ui/views/fullscreen_exit_bubble_views.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6f91a6521e589d7bfc3f50fefc99b159d127c49b |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/fullscreen_exit_bubble_views.h |
| @@ -0,0 +1,64 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_ |
| +#define CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_ |
| +#pragma once |
| + |
| +#include "base/basictypes.h" |
|
tony
2011/08/02 17:04:25
Do we still need basictypes.h?
jeremya
2011/08/03 07:32:30
Guess not. Done.
|
| +#include "base/compiler_specific.h" |
| +#include "chrome/browser/ui/fullscreen_exit_bubble.h" |
| +#include "views/controls/link_listener.h" |
| + |
| +namespace views { |
| +class View; |
| +class Widget; |
| +} |
| + |
| +// FullscreenExitBubbleViews is responsible for showing a bubble atop the |
| +// screen in fullscreen mode, telling users how to exit and providing a click |
| +// target. The bubble auto-hides, and re-shows when the user moves to the |
| +// screen top. |
| +class FullscreenExitBubbleViews : public views::LinkListener, |
| + public FullscreenExitBubble { |
| + public: |
| + explicit FullscreenExitBubbleViews( |
|
tony
2011/08/02 17:04:25
Drop explicit.
jeremya
2011/08/03 07:32:30
Done.
|
| + views::Widget* frame, |
| + CommandUpdater::CommandUpdaterDelegate* delegate); |
| + virtual ~FullscreenExitBubbleViews(); |
| + |
| + private: |
| + class FullscreenExitView; |
| + |
| + // views::LinkListener: |
| + virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; |
| + |
| + // The root view containing us. |
| + views::View* root_view_; |
| + |
| + views::Widget* popup_; |
| + |
| + // Animation controlling sliding into/out of the top of the screen. |
| + scoped_ptr<ui::SlideAnimation> size_animation_; |
| + |
| + // FullScreenExitBubble |
| + virtual gfx::Rect GetPopupRect(bool ignore_animation_state) const; |
| + virtual gfx::Point GetCursorScreenPoint(); |
| + virtual bool WindowContainsPoint(gfx::Point pos); |
| + virtual bool IsWindowActive(); |
| + virtual void Hide(); |
| + virtual void Show(); |
| + virtual bool IsAnimating(); |
|
tony
2011/08/02 17:04:25
Please add OVERRIDE to these methods.
jeremya
2011/08/03 07:32:30
Done.
|
| + |
| + // ui::AnimationDelegate: |
| + void AnimationProgressed(const ui::Animation* animation); |
| + void AnimationEnded(const ui::Animation* animation); |
| + |
| + // The contents of the popup. |
| + FullscreenExitView* view_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(FullscreenExitBubbleViews); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_ |