OLD | NEW |
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_CHROMEOS_FRAME_PANEL_BROWSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_FRAME_PANEL_BROWSER_VIEW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_FRAME_PANEL_BROWSER_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_FRAME_PANEL_BROWSER_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/browser/chromeos/frame/panel_controller.h" | 10 #include "chrome/browser/chromeos/frame/panel_controller.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 explicit PanelBrowserView(Browser* browser); | 26 explicit PanelBrowserView(Browser* browser); |
27 virtual ~PanelBrowserView(); | 27 virtual ~PanelBrowserView(); |
28 | 28 |
29 // BrowserView overrides. | 29 // BrowserView overrides. |
30 virtual void Show() OVERRIDE; | 30 virtual void Show() OVERRIDE; |
31 virtual void ShowInactive() OVERRIDE; | 31 virtual void ShowInactive() OVERRIDE; |
32 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 32 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
33 virtual void Close() OVERRIDE; | 33 virtual void Close() OVERRIDE; |
34 virtual void UpdateTitleBar() OVERRIDE; | 34 virtual void UpdateTitleBar() OVERRIDE; |
35 virtual WindowOpenDisposition GetDispositionForPopupBounds( | 35 virtual WindowOpenDisposition GetDispositionForPopupBounds( |
36 const gfx::Rect& bounds) OVERRIDE OVERRIDE; | 36 const gfx::Rect& bounds) OVERRIDE; |
37 virtual bool GetSavedWindowBounds(gfx::Rect* bounds) const OVERRIDE; | 37 virtual bool GetSavedWindowBounds(gfx::Rect* bounds) const OVERRIDE; |
38 virtual void OnWindowActivationChanged(bool active) OVERRIDE; | 38 virtual void OnWindowActivationChanged(bool active) OVERRIDE; |
39 | 39 |
40 // BrowserView : TabStripModelObserver overrides. | 40 // BrowserView : TabStripModelObserver overrides. |
41 virtual void TabChangedAt(TabContentsWrapper* contents, | 41 virtual void TabChangedAt(TabContentsWrapper* contents, |
42 int index, | 42 int index, |
43 TabChangeType change_type) OVERRIDE; | 43 TabChangeType change_type) OVERRIDE; |
44 | 44 |
45 // PanelController::Delegate overrides. | 45 // PanelController::Delegate overrides. |
46 virtual string16 GetPanelTitle() OVERRIDE; | 46 virtual string16 GetPanelTitle() OVERRIDE; |
47 virtual SkBitmap GetPanelIcon() OVERRIDE; | 47 virtual SkBitmap GetPanelIcon() OVERRIDE; |
48 virtual bool CanClosePanel() OVERRIDE; | 48 virtual bool CanClosePanel() OVERRIDE; |
49 virtual void ClosePanel() OVERRIDE; | 49 virtual void ClosePanel() OVERRIDE; |
50 virtual void ActivatePanel() OVERRIDE; | 50 virtual void ActivatePanel() OVERRIDE; |
51 virtual void OnPanelStateChanged(PanelController::State state) OVERRIDE; | |
52 | 51 |
53 // Specific to PanelBrowserView. | 52 // Specific to PanelBrowserView. |
54 void SetCreatorView(PanelBrowserView* creator); | 53 void SetCreatorView(PanelBrowserView* creator); |
55 | 54 |
56 private: | 55 private: |
57 // Enforces the min, max, and default bounds. | 56 // Enforces the min, max, and default bounds. |
58 void LimitBounds(gfx::Rect* bounds) const; | 57 void LimitBounds(gfx::Rect* bounds) const; |
59 | 58 |
60 void InitPanelController(bool is_active); | 59 void InitPanelController(bool is_active); |
61 | 60 |
62 // Controls interactions with the window manager for popup panels. | 61 // Controls interactions with the window manager for popup panels. |
63 scoped_ptr<chromeos::PanelController> panel_controller_; | 62 scoped_ptr<chromeos::PanelController> panel_controller_; |
64 | 63 |
65 // X id for the content window of the panel that created this | 64 // X id for the content window of the panel that created this |
66 // panel. This tells ChromeOS that it should be created next to the | 65 // panel. This tells ChromeOS that it should be created next to the |
67 // content window of this panel. | 66 // content window of this panel. |
68 XID creator_xid_; | 67 XID creator_xid_; |
69 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); | 68 DISALLOW_COPY_AND_ASSIGN(PanelBrowserView); |
70 }; | 69 }; |
71 | 70 |
72 } // namespace chromeos | 71 } // namespace chromeos |
73 | 72 |
74 #endif // CHROME_BROWSER_CHROMEOS_FRAME_PANEL_BROWSER_VIEW_H_ | 73 #endif // CHROME_BROWSER_CHROMEOS_FRAME_PANEL_BROWSER_VIEW_H_ |
OLD | NEW |