Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(967)

Unified Diff: chrome/browser/ui/fullscreen_exit_bubble.h

Issue 7740044: Implement fullscreen info bubble on Win and Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: respond to comments Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/fullscreen_exit_bubble.h
diff --git a/chrome/browser/ui/fullscreen_exit_bubble.h b/chrome/browser/ui/fullscreen_exit_bubble.h
index 0f2c14c094ad1e9aa38c42c22b3d9a90943ede7c..0bb96dbc24b109b3ac838d47ec44543b25a82242 100644
--- a/chrome/browser/ui/fullscreen_exit_bubble.h
+++ b/chrome/browser/ui/fullscreen_exit_bubble.h
@@ -9,9 +9,12 @@
#include "base/memory/scoped_ptr.h"
#include "base/timer.h"
#include "chrome/browser/command_updater.h"
+#include "googleurl/src/gurl.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/gfx/point.h"
+class Browser;
+
namespace ui {
class SlideAnimation;
}
@@ -22,17 +25,17 @@ class Rect;
class FullscreenExitBubble : public ui::AnimationDelegate {
public:
- explicit FullscreenExitBubble(
- CommandUpdater::CommandUpdaterDelegate* delegate);
+ explicit FullscreenExitBubble(Browser* browser);
virtual ~FullscreenExitBubble();
protected:
- static const double kOpacity; // Opacity of the bubble, 0.0 - 1.0
static const int kPaddingPx; // Amount of padding around the link
static const int kInitialDelayMs; // Initial time bubble remains onscreen
static const int kIdleTimeMs; // Time before mouse idle triggers hide
static const int kPositionCheckHz; // How fast to check the mouse position
static const int kSlideInRegionHeightPx;
+ // Space between the popup and the top of the screen.
tony 2011/10/13 22:34:39 Nit: The other comments are on the same line. See
Peter Kasting 2011/10/13 23:48:06 Yeah, in this case I'd just do: static const int
koz (OOO until 15th September) 2011/10/14 00:35:16 Done.
koz (OOO until 15th September) 2011/10/14 00:35:16 Done.
+ static const int kPopupTopPx;
// Height of region triggering slide-in
tony 2011/10/13 22:34:39 Nit: This comment appears to belong to kSlideInReg
koz (OOO until 15th September) 2011/10/14 00:35:16 Done.
static const int kSlideInDurationMs; // Duration of slide-in animation
static const int kSlideOutDurationMs; // Duration of slide-out animation
@@ -41,9 +44,7 @@ class FullscreenExitBubble : public ui::AnimationDelegate {
// |ignore_animation_state| is true this returns the rect assuming the popup
// is fully onscreen.
virtual gfx::Rect GetPopupRect(bool ignore_animation_state) const = 0;
-
virtual gfx::Point GetCursorScreenPoint() = 0;
-
virtual bool WindowContainsPoint(gfx::Point pos) = 0;
// Returns true if the window is active.
@@ -65,12 +66,13 @@ class FullscreenExitBubble : public ui::AnimationDelegate {
void StartWatchingMouse();
void ToggleFullscreen();
+ void AcceptFullscreen(const GURL& url);
+ void CancelFullscreen();
- private:
- // Someone who can toggle fullscreen mode on and off when the user requests
- // it.
- CommandUpdater::CommandUpdaterDelegate* delegate_;
+ // The browser this bubble is in.
+ Browser* browser_;
+ private:
// Timer to delay before allowing the bubble to hide after it's initially
// shown.
base::OneShotTimer<FullscreenExitBubble> initial_delay_;

Powered by Google App Engine
This is Rietveld 408576698