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

Unified Diff: chrome/browser/ui/views/frame/immersive_mode_controller.h

Issue 48963002: [Refactor] Move the non-browser specific logic of ImmersiveModeControllerAsh into ash part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/views/frame/immersive_mode_controller.h
diff --git a/chrome/browser/ui/views/frame/immersive_mode_controller.h b/chrome/browser/ui/views/frame/immersive_mode_controller.h
index 3810a240af6cc87d4695be96487148612e59d5e4..2221ca7cb143c9ec61b6f853d90ef87be5693bd8 100644
--- a/chrome/browser/ui/views/frame/immersive_mode_controller.h
+++ b/chrome/browser/ui/views/frame/immersive_mode_controller.h
@@ -8,8 +8,11 @@
#include "base/compiler_specific.h"
#include "base/observer_list.h"
-class BookmarkBarView;
-class FullscreenController;
+#if defined(USE_ASH)
+#include "ash/wm/immersive_revealed_lock.h"
+#endif
+
+class BrowserView;
namespace content {
class WebContents;
@@ -20,18 +23,16 @@ class Rect;
class Size;
}
-namespace views {
-class View;
-class Widget;
-}
-
-// Base class for a lock which keeps the top-of-window views revealed for the
-// duration of its lifetime. See ImmersiveModeController::GetRevealedLock() for
-// more details.
+#if defined(USE_ASH)
+typedef ash::ImmersiveRevealedLock ImmersiveRevealedLock;
+#else
+// Do nothing version of ash::ImmersiveRevealedLock.
class ImmersiveRevealedLock {
public:
- virtual ~ImmersiveRevealedLock() {}
+ ImmersiveRevealedLock() {}
+ ~ImmersiveRevealedLock() {}
};
+#endif
// Controller for an "immersive mode" similar to MacOS presentation mode where
// the top-of-window views are hidden until the mouse hits the top of the
@@ -57,32 +58,11 @@ class ImmersiveModeController {
virtual ~Observer() {}
};
- class Delegate {
- public:
- // Returns the browser's FullscreenController.
- virtual FullscreenController* GetFullscreenController() = 0;
-
- // Returns the browser's active web contents for the active tab, or NULL if
- // such does not exist.
- virtual content::WebContents* GetWebContents() = 0;
-
- // Notifies the delegate that fullscreen has been entered or exited.
- virtual void FullscreenStateChanged() = 0;
-
- // Requests that the tab strip be painted in a short, "light bar" style.
- virtual void SetImmersiveStyle(bool immersive) = 0;
-
- protected:
- virtual ~Delegate() {}
- };
-
ImmersiveModeController();
virtual ~ImmersiveModeController();
// Must initialize after browser view has a Widget and native window.
- virtual void Init(Delegate* delegate,
- views::Widget* widget,
- views::View* top_container) = 0;
+ virtual void Init(BrowserView* browser_view) = 0;
// Enables or disables immersive mode.
virtual void SetEnabled(bool enabled) = 0;

Powered by Google App Engine
This is Rietveld 408576698