| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_FULLSCREEN_FULLSCREEN_EXIT_BUBBLE_H_ | 5 #ifndef CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_EXIT_BUBBLE_H_ |
| 6 #define CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_EXIT_BUBBLE_H_ | 6 #define CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_EXIT_BUBBLE_H_ |
| 7 | 7 |
| 8 #include "base/timer.h" | 8 #include "base/timer.h" |
| 9 #include "chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.h" | 9 #include "chrome/browser/ui/fullscreen/fullscreen_exit_bubble_type.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| 11 #include "ui/base/animation/animation_delegate.h" | 11 #include "ui/base/animation/animation_delegate.h" |
| 12 #include "ui/gfx/point.h" | 12 #include "ui/gfx/point.h" |
| 13 | 13 |
| 14 class Browser; | 14 class Browser; |
| 15 | 15 |
| 16 namespace gfx { | 16 namespace gfx { |
| 17 class Rect; | 17 class Rect; |
| 18 } | 18 } |
| 19 | 19 |
| 20 class FullscreenExitBubble : public ui::AnimationDelegate { | 20 class FullscreenExitBubble : public ui::AnimationDelegate { |
| 21 public: | 21 public: |
| 22 explicit FullscreenExitBubble(Browser* browser, | 22 FullscreenExitBubble(Browser* browser, |
| 23 const GURL& url, | 23 const GURL& url, |
| 24 FullscreenExitBubbleType bubble_type); | 24 FullscreenExitBubbleType bubble_type); |
| 25 virtual ~FullscreenExitBubble(); | 25 virtual ~FullscreenExitBubble(); |
| 26 | 26 |
| 27 protected: | 27 protected: |
| 28 static const int kPaddingPx; // Amount of padding around the link | 28 static const int kPaddingPx; // Amount of padding around the link |
| 29 static const int kInitialDelayMs; // Initial time bubble remains onscreen | 29 static const int kInitialDelayMs; // Initial time bubble remains onscreen |
| 30 static const int kIdleTimeMs; // Time before mouse idle triggers hide | 30 static const int kIdleTimeMs; // Time before mouse idle triggers hide |
| 31 static const int kPositionCheckHz; // How fast to check the mouse position | 31 static const int kPositionCheckHz; // How fast to check the mouse position |
| 32 static const int kSlideInRegionHeightPx; | 32 static const int kSlideInRegionHeightPx; |
| 33 // Height of region triggering | 33 // Height of region triggering |
| 34 // slide-in | 34 // slide-in |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 base::RepeatingTimer<FullscreenExitBubble> mouse_position_checker_; | 101 base::RepeatingTimer<FullscreenExitBubble> mouse_position_checker_; |
| 102 | 102 |
| 103 // The most recently seen mouse position, in screen coordinates. Used to see | 103 // The most recently seen mouse position, in screen coordinates. Used to see |
| 104 // if the mouse has moved since our last check. | 104 // if the mouse has moved since our last check. |
| 105 gfx::Point last_mouse_pos_; | 105 gfx::Point last_mouse_pos_; |
| 106 | 106 |
| 107 DISALLOW_COPY_AND_ASSIGN(FullscreenExitBubble); | 107 DISALLOW_COPY_AND_ASSIGN(FullscreenExitBubble); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 #endif // CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_EXIT_BUBBLE_H_ | 110 #endif // CHROME_BROWSER_UI_FULLSCREEN_FULLSCREEN_EXIT_BUBBLE_H_ |
| OLD | NEW |