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

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
9 namespace gfx { 11 namespace gfx {
10 class Rect; 12 class Rect;
11 } // namespace gfx 13 } // namespace gfx
12 14
13 // An interface for a class that implements platform-specific behavior for panel 15 // An interface for a class that implements platform-specific behavior for panel
14 // windows. We use this interface for two reasons: 16 // windows. We use this interface for two reasons:
15 // 1. We don't want to use BrowserWindow as the interface between shared panel 17 // 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 18 // 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(). 19 // 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 20 // 2. We need some additional methods that BrowserWindow doesn't provide, such
19 // as MinimizePanel() and RestorePanel(). 21 // as MinimizePanel() and RestorePanel().
20 // Note that even though we don't use BrowserWindow directly, Windows and GTK+ 22 // 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 23 // still use the BrowserWindow interface as part of their implementation so we
22 // use Panel in all the method names to avoid collisions. 24 // use Panel in all the method names to avoid collisions.
23 class NativePanel { 25 class NativePanel {
24 public: 26 public:
jennb 2011/06/08 21:14:08 Should we make all these methods protected and onl
jianli 2011/06/08 21:38:10 Done.
25 virtual void ShowPanel() = 0; 27 virtual void ShowPanel() = 0;
26 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0; 28 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0;
27 virtual void MinimizePanel() = 0; 29 virtual void MinimizePanel() = 0;
28 virtual void RestorePanel() = 0; 30 virtual void RestorePanel() = 0;
29 virtual void ClosePanel() = 0; 31 virtual void ClosePanel() = 0;
30 virtual void ActivatePanel() = 0; 32 virtual void ActivatePanel() = 0;
31 virtual void DeactivePanel() = 0; 33 virtual void DeactivatePanel() = 0;
32 virtual bool IsActivePanel() const = 0; 34 virtual bool IsPanelActive() const = 0;
35 virtual gfx::NativeWindow GetNativePanelHandle() = 0;
36 virtual void UpdatePanelTitleBar() = 0;
37 virtual void ShowTaskManagerForPanel() = 0;
38 virtual void NotifyPanelOnUserChangedTheme() = 0;
33 virtual void FlashPanelFrame() = 0; 39 virtual void FlashPanelFrame() = 0;
40 virtual void DestroyPanelBrowser() = 0;
34 41
35 protected: 42 protected:
36 virtual ~NativePanel() {} 43 virtual ~NativePanel() {}
37 }; 44 };
38 45
39 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ 46 #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