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

Unified Diff: chrome/browser/ui/panels/panel_manager.h

Issue 8686012: Make panels not show on top when there is an app running in full screen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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/panels/panel_manager.h
diff --git a/chrome/browser/ui/panels/panel_manager.h b/chrome/browser/ui/panels/panel_manager.h
index ce78dbe50b283c9aff941975f9be4ffd31ed8dd7..2372a079b032d7ef9c19a17225ac8f3f3717244c 100644
--- a/chrome/browser/ui/panels/panel_manager.h
+++ b/chrome/browser/ui/panels/panel_manager.h
@@ -11,6 +11,7 @@
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
+#include "base/timer.h"
#include "chrome/browser/ui/panels/auto_hiding_desktop_bar.h"
#include "chrome/browser/ui/panels/panel.h"
#include "chrome/browser/ui/panels/panel_mouse_watcher_observer.h"
@@ -90,9 +91,11 @@ class PanelManager : public PanelMouseWatcherObserver,
// |is_new| is true if the panel was just created.
void MoveToOverflowStrip(Panel* panel, bool is_new);
- // Overridden from PanelMouseWatcherObserver:
+ // Overridden from PanelMouseWatcher::Observer:
Dmitry Titov 2011/11/30 01:35:53 Isn't it now PanelMouseWatcherObserver?
prasadt 2011/11/30 02:38:47 Done.
virtual void OnMouseMove(const gfx::Point& mouse_position) OVERRIDE;
+ bool is_full_screen_mode_on() const { return is_full_screen_mode_on_; }
+
#ifdef UNIT_TEST
static int horizontal_spacing() { return kPanelsHorizontalSpacing; }
@@ -231,6 +234,11 @@ class PanelManager : public PanelMouseWatcherObserver,
bool mouse_watching_disabled_; // For tests to simulate mouse movements.
+ // Timer used to track if the current active app is in full screen mode.
+ base::RepeatingTimer<PanelManager> full_screen_mode_timer_;
+ void CheckFullScreenMode();
+ bool is_full_screen_mode_on_;
+
static const int kPanelsHorizontalSpacing = 4;
// Absolute minimum width and height for panels, including non-client area.
@@ -239,6 +247,8 @@ class PanelManager : public PanelMouseWatcherObserver,
static const int kPanelMinWidth;
static const int kPanelMinHeight;
+ static const int kFullScreenModeCheckInterval = 1000;
Dmitry Titov 2011/11/30 01:35:53 this is implementation detail, does not have to be
jianli 2011/11/30 01:53:15 Can this constant be moved to .cc file?
prasadt 2011/11/30 02:38:47 Done.
prasadt 2011/11/30 02:38:47 Done.
+
DISALLOW_COPY_AND_ASSIGN(PanelManager);
};

Powered by Google App Engine
This is Rietveld 408576698