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

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

Issue 7104067: Make PanelBrowserView derive from NativePanel. Also add some more methods to NativePanel. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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_browser_view.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 "ui/gfx/native_widget_types.h"
10
11 class Panel;
12
9 namespace gfx { 13 namespace gfx {
10 class Rect; 14 class Rect;
11 } // namespace gfx 15 } // namespace gfx
12 16
13 // An interface for a class that implements platform-specific behavior for panel 17 // An interface for a class that implements platform-specific behavior for panel
14 // windows. We use this interface for two reasons: 18 // windows. We use this interface for two reasons:
15 // 1. We don't want to use BrowserWindow as the interface between shared panel 19 // 1. We don't want to use BrowserWindow as the interface between shared panel
16 // code and platform-specific code. BrowserWindow has a lot of methods, most 20 // code and platform-specific code. BrowserWindow has a lot of methods, most
17 // of which we don't use and simply stub out with NOTIMPLEMENTED(). 21 // of which we don't use and simply stub out with NOTIMPLEMENTED().
18 // 2. We need some additional methods that BrowserWindow doesn't provide, such 22 // 2. We need some additional methods that BrowserWindow doesn't provide, such
19 // as MinimizePanel() and RestorePanel(). 23 // as MinimizePanel() and RestorePanel().
20 // Note that even though we don't use BrowserWindow directly, Windows and GTK+ 24 // Note that even though we don't use BrowserWindow directly, Windows and GTK+
21 // still use the BrowserWindow interface as part of their implementation so we 25 // still use the BrowserWindow interface as part of their implementation so we
22 // use Panel in all the method names to avoid collisions. 26 // use Panel in all the method names to avoid collisions.
23 class NativePanel { 27 class NativePanel {
24 public: 28 friend class Panel;
29
30 protected:
31 virtual ~NativePanel() {}
32
25 virtual void ShowPanel() = 0; 33 virtual void ShowPanel() = 0;
26 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0; 34 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0;
27 virtual void MinimizePanel() = 0; 35 virtual void MinimizePanel() = 0;
28 virtual void RestorePanel() = 0; 36 virtual void RestorePanel() = 0;
29 virtual void ClosePanel() = 0; 37 virtual void ClosePanel() = 0;
30 virtual void ActivatePanel() = 0; 38 virtual void ActivatePanel() = 0;
31 virtual void DeactivePanel() = 0; 39 virtual void DeactivatePanel() = 0;
32 virtual bool IsActivePanel() const = 0; 40 virtual bool IsPanelActive() const = 0;
41 virtual gfx::NativeWindow GetNativePanelHandle() = 0;
42 virtual void UpdatePanelTitleBar() = 0;
43 virtual void ShowTaskManagerForPanel() = 0;
44 virtual void NotifyPanelOnUserChangedTheme() = 0;
33 virtual void FlashPanelFrame() = 0; 45 virtual void FlashPanelFrame() = 0;
34 46 virtual void DestroyPanelBrowser() = 0;
35 protected:
36 virtual ~NativePanel() {}
37 }; 47 };
38 48
39 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ 49 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/panel_browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698