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

Side by Side Diff: chrome/browser/ui/panels/auto_hide_bottom_bar.h

Issue 7646003: Support auto-hide taskbar for panels on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_PANELS_AUTO_HIDE_BOTTOM_BAR_H_
6 #define CHROME_BROWSER_UI_PANELS_AUTO_HIDE_BOTTOM_BAR_H_
7 #pragma once
8
9 #include "base/memory/ref_counted.h"
10
11 namespace gfx {
12 class Rect;
13 }
14
15 // Encapsulates the logic to deal with always-on-top system/app bar that is
16 // located at the bottom of the screen and set to auto-hide, like Windows
17 // taskbar or MacOSX dock.
18 class AutoHideBottomBar : public base::RefCountedThreadSafe<AutoHideBottomBar> {
Dmitry Titov 2011/08/22 22:35:53 why this class is refcounted? It seems the singlet
jianli 2011/08/22 23:28:10 The test also keep a ref count to the mock because
19 public:
20 enum Visibility {
Dmitry Titov 2011/08/22 22:35:53 What do you think about this: Do we also need AUTO
jianli 2011/08/22 23:28:10 I think this state is not needed because this clas
21 VISIBLE,
22 ANIMATING,
23 HIDDEN
24 };
25
26 // Observer can listen to various events regarding the bottom bar changes.
27 // StartMonitoring should be called first if you want observer to receive
28 // the notifications.
29 class Observer {
30 public:
31 virtual void OnAutoHideBottomBarVisibilityChanged(
32 Visibility visibility) = 0;
33 virtual void OnAutoHideBottomBarHeightChanged(int height) = 0;
34 };
35
36 static AutoHideBottomBar* Create(Observer* observer);
37
38 virtual ~AutoHideBottomBar() { }
39
40 // This should be called each time when the work area is changed. We only
41 // care about the bottom bar that sits on the screen that hosts the specified
42 // work area.
43 virtual void UpdateWorkArea(const gfx::Rect& work_area) = 0;
44
45 // Returns true if the auto-hide bottom bar exists.
46 virtual bool Exists() = 0;
Dmitry Titov 2011/08/22 22:35:53 See comment above about AUTOHIDE_DISABLED. If we h
jianli 2011/08/22 23:28:10 See my reply above.
47
48 // Returns the fixed height of the bottom bar. Note that the height remains
Dmitry Titov 2011/08/22 22:35:53 Suggestion on comment (not sure it's clearer thoug
jianli 2011/08/22 23:28:10 Done.
49 // unchanged no matter whether the bottom bar is brought up or down.
50 virtual int GetHeight() = 0;
51
52 virtual Visibility GetVisibility() = 0;
53 };
54
55 #endif // CHROME_BROWSER_UI_PANELS_AUTO_HIDE_BOTTOM_BAR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/auto_hide_bottom_bar_cocoa.mm » ('j') | chrome/browser/ui/panels/panel_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698