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

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

Issue 7242017: Support minimizing the panel into 3-pixel line on Windows. Also support bringing up/down the titl... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/panels/panel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_
6 #define CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ 6 #define CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/ui/panels/panel.h"
9 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
10 11
11 class Panel; 12 class Panel;
12 13
13 namespace gfx { 14 namespace gfx {
14 class Rect; 15 class Rect;
15 } // namespace gfx 16 } // namespace gfx
16 17
17 // An interface for a class that implements platform-specific behavior for panel 18 // An interface for a class that implements platform-specific behavior for panel
18 // windows. We use this interface for two reasons: 19 // windows. We use this interface for two reasons:
19 // 1. We don't want to use BrowserWindow as the interface between shared panel 20 // 1. We don't want to use BrowserWindow as the interface between shared panel
20 // code and platform-specific code. BrowserWindow has a lot of methods, most 21 // code and platform-specific code. BrowserWindow has a lot of methods, most
21 // of which we don't use and simply stub out with NOTIMPLEMENTED(). 22 // of which we don't use and simply stub out with NOTIMPLEMENTED().
22 // 2. We need some additional methods that BrowserWindow doesn't provide, such 23 // 2. We need some additional methods that BrowserWindow doesn't provide, such
23 // as MinimizePanel() and RestorePanel(). 24 // as MinimizePanel() and RestorePanel().
24 // Note that even though we don't use BrowserWindow directly, Windows and GTK+ 25 // Note that even though we don't use BrowserWindow directly, Windows and GTK+
25 // still use the BrowserWindow interface as part of their implementation so we 26 // still use the BrowserWindow interface as part of their implementation so we
26 // use Panel in all the method names to avoid collisions. 27 // use Panel in all the method names to avoid collisions.
27 class NativePanel { 28 class NativePanel {
28 friend class Panel; 29 friend class Panel;
29 30
30 protected: 31 protected:
31 virtual ~NativePanel() {} 32 virtual ~NativePanel() {}
32 33
33 virtual void ShowPanel() = 0; 34 virtual void ShowPanel() = 0;
34 virtual void ShowPanelInactive() = 0; 35 virtual void ShowPanelInactive() = 0;
35 virtual gfx::Rect GetPanelBounds() const = 0; 36 virtual gfx::Rect GetPanelBounds() const = 0;
36 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0; 37 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0;
37 virtual void MinimizePanel() = 0; 38 virtual void OnPanelExpansionStateChanged(
38 virtual void RestorePanel() = 0; 39 Panel::ExpansionState expansion_state) = 0;
40
41 // When the mouse is over (mouse_x, mouse_y), finds out if the title-bar
42 // needs to pop up for the minimized panel that is only shown as 3-pixel
43 // lines.
44 virtual bool ShouldBringUpPanelTitleBar(int mouse_x, int mouse_y) const = 0;
45
39 virtual void ClosePanel() = 0; 46 virtual void ClosePanel() = 0;
40 virtual void ActivatePanel() = 0; 47 virtual void ActivatePanel() = 0;
41 virtual void DeactivatePanel() = 0; 48 virtual void DeactivatePanel() = 0;
42 virtual bool IsPanelActive() const = 0; 49 virtual bool IsPanelActive() const = 0;
43 virtual gfx::NativeWindow GetNativePanelHandle() = 0; 50 virtual gfx::NativeWindow GetNativePanelHandle() = 0;
44 virtual void UpdatePanelTitleBar() = 0; 51 virtual void UpdatePanelTitleBar() = 0;
45 virtual void ShowTaskManagerForPanel() = 0; 52 virtual void ShowTaskManagerForPanel() = 0;
46 virtual void NotifyPanelOnUserChangedTheme() = 0; 53 virtual void NotifyPanelOnUserChangedTheme() = 0;
47 virtual void FlashPanelFrame() = 0; 54 virtual void FlashPanelFrame() = 0;
48 virtual void DestroyPanelBrowser() = 0; 55 virtual void DestroyPanelBrowser() = 0;
49 }; 56 };
50 57
51 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ 58 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/panel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698