OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "chrome/browser/ui/fullscreen_exit_bubble.h" | 10 #include "chrome/browser/ui/fullscreen_exit_bubble.h" |
11 #include "googleurl/src/gurl.h" | |
11 #include "views/controls/link_listener.h" | 12 #include "views/controls/link_listener.h" |
12 | 13 |
13 namespace views { | 14 namespace views { |
14 class View; | 15 class View; |
15 class Widget; | 16 class Widget; |
16 } | 17 } |
17 | 18 |
18 // FullscreenExitBubbleViews is responsible for showing a bubble atop the | 19 // FullscreenExitBubbleViews is responsible for showing a bubble atop the |
19 // screen in fullscreen mode, telling users how to exit and providing a click | 20 // 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 // target. The bubble auto-hides, and re-shows when the user moves to the |
21 // screen top. | 22 // screen top. |
22 class FullscreenExitBubbleViews : public views::LinkListener, | 23 class FullscreenExitBubbleViews : public views::LinkListener, |
23 public FullscreenExitBubble { | 24 public FullscreenExitBubble { |
24 public: | 25 public: |
25 FullscreenExitBubbleViews( | 26 FullscreenExitBubbleViews( |
26 views::Widget* frame, | 27 views::Widget* frame, |
Peter Kasting
2011/10/11 23:08:32
Nit: Move this up to the previous line and align o
koz (OOO until 15th September)
2011/10/12 05:38:23
Done.
| |
27 CommandUpdater::CommandUpdaterDelegate* delegate); | 28 Browser* browser, |
29 const GURL& url, | |
30 bool ask_permission); | |
28 virtual ~FullscreenExitBubbleViews(); | 31 virtual ~FullscreenExitBubbleViews(); |
29 | 32 |
33 void OnAcceptFullscreen(); | |
34 void OnCancelFullscreen(); | |
30 protected: | 35 protected: |
Peter Kasting
2011/10/11 23:08:32
Nit: Blank line above protected:
koz (OOO until 15th September)
2011/10/12 05:38:23
Done.
| |
31 // FullScreenExitBubble | 36 // FullScreenExitBubble |
32 virtual gfx::Rect GetPopupRect(bool ignore_animation_state) const OVERRIDE; | 37 virtual gfx::Rect GetPopupRect(bool ignore_animation_state) const OVERRIDE; |
33 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; | 38 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; |
34 virtual bool WindowContainsPoint(gfx::Point pos) OVERRIDE; | 39 virtual bool WindowContainsPoint(gfx::Point pos) OVERRIDE; |
35 virtual bool IsWindowActive() OVERRIDE; | 40 virtual bool IsWindowActive() OVERRIDE; |
36 virtual void Hide() OVERRIDE; | 41 virtual void Hide() OVERRIDE; |
37 virtual void Show() OVERRIDE; | 42 virtual void Show() OVERRIDE; |
38 virtual bool IsAnimating() OVERRIDE; | 43 virtual bool IsAnimating() OVERRIDE; |
39 | 44 |
40 private: | 45 private: |
(...skipping 10 matching lines...) Expand all Loading... | |
51 // Animation controlling sliding into/out of the top of the screen. | 56 // Animation controlling sliding into/out of the top of the screen. |
52 scoped_ptr<ui::SlideAnimation> size_animation_; | 57 scoped_ptr<ui::SlideAnimation> size_animation_; |
53 | 58 |
54 // ui::AnimationDelegate: | 59 // ui::AnimationDelegate: |
55 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; | 60 virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE; |
56 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; | 61 virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE; |
57 | 62 |
58 // The contents of the popup. | 63 // The contents of the popup. |
59 FullscreenExitView* view_; | 64 FullscreenExitView* view_; |
60 | 65 |
66 const GURL& url_; | |
67 | |
61 DISALLOW_COPY_AND_ASSIGN(FullscreenExitBubbleViews); | 68 DISALLOW_COPY_AND_ASSIGN(FullscreenExitBubbleViews); |
62 }; | 69 }; |
63 | 70 |
64 #endif // CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_ | 71 #endif // CHROME_BROWSER_UI_VIEWS_FULLSCREEN_EXIT_BUBBLE_VIEWS_H_ |
OLD | NEW |