OLD | NEW |
(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_PANEL_MANAGER_WIN_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_WIN_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/ui/panels/panel_manager.h" |
| 11 |
| 12 class PanelManagerMouseWatcher; |
| 13 |
| 14 class PanelManagerWin : public PanelManager { |
| 15 public: |
| 16 PanelManagerWin(); |
| 17 virtual ~PanelManagerWin(); |
| 18 |
| 19 virtual void Remove(Panel* panel) OVERRIDE; |
| 20 virtual void Minimize(Panel* panel) OVERRIDE; |
| 21 virtual void Restore(Panel* panel, bool titlebar_only) OVERRIDE; |
| 22 |
| 23 private: |
| 24 friend class PanelManagerMouseWatcher; |
| 25 |
| 26 // Ensures that the global mouse watcher is started so that we can bring |
| 27 // up or down the titlebar for those minimized panels. |
| 28 void EnsureMouseWatchStarted(int height_to_watch_on_mouse_enter, |
| 29 int height_to_watch_on_mouse_exit); |
| 30 |
| 31 // Stops the global mouse watcher if it is not needed, when all panels are |
| 32 // fully restored. |
| 33 void StopMouseWatchIfNotNeeded(); |
| 34 |
| 35 // Brings up or down the titlebar for all minimized panels. This does not |
| 36 // affect all other panels that are fully restored. |
| 37 void BringUpTitleBarForAllMinimizedPanels(); |
| 38 void BringDownTitleBarForAllMinimizedPanels(); |
| 39 |
| 40 scoped_ptr<PanelManagerMouseWatcher> mouse_watcher_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(PanelManagerWin); |
| 43 }; |
| 44 |
| 45 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_WIN_H_ |
OLD | NEW |