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

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

Issue 7537030: Make panel adjust bounds per preferred size change notification on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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
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_PANEL_BROWSER_WINDOW_COCOA_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_COCOA_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_COCOA_H_ 6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_COCOA_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 11 matching lines...) Expand all
22 class PanelBrowserWindowCocoa : public NativePanel, 22 class PanelBrowserWindowCocoa : public NativePanel,
23 public NativePanelTesting { 23 public NativePanelTesting {
24 public: 24 public:
25 PanelBrowserWindowCocoa(Browser* browser, Panel* panel, 25 PanelBrowserWindowCocoa(Browser* browser, Panel* panel,
26 const gfx::Rect& bounds); 26 const gfx::Rect& bounds);
27 virtual ~PanelBrowserWindowCocoa(); 27 virtual ~PanelBrowserWindowCocoa();
28 28
29 // Overridden from NativePanel 29 // Overridden from NativePanel
30 virtual void ShowPanel() OVERRIDE; 30 virtual void ShowPanel() OVERRIDE;
31 virtual void ShowPanelInactive() OVERRIDE; 31 virtual void ShowPanelInactive() OVERRIDE;
32 virtual gfx::Rect GetPanelRestoredBounds() const OVERRIDE;
32 virtual gfx::Rect GetPanelBounds() const OVERRIDE; 33 virtual gfx::Rect GetPanelBounds() const OVERRIDE;
34 virtual void SetPanelRestoredBounds(const gfx::Rect& bounds) OVERRIDE;
33 virtual void SetPanelBounds(const gfx::Rect& bounds) OVERRIDE; 35 virtual void SetPanelBounds(const gfx::Rect& bounds) OVERRIDE;
34 virtual void OnPanelExpansionStateChanged( 36 virtual void OnPanelExpansionStateChanged(
35 Panel::ExpansionState expansion_state) OVERRIDE; 37 Panel::ExpansionState expansion_state) OVERRIDE;
36 virtual bool ShouldBringUpPanelTitleBar(int mouse_x, 38 virtual bool ShouldBringUpPanelTitleBar(int mouse_x,
37 int mouse_y) const OVERRIDE; 39 int mouse_y) const OVERRIDE;
38 virtual void ClosePanel() OVERRIDE; 40 virtual void ClosePanel() OVERRIDE;
39 virtual void ActivatePanel() OVERRIDE; 41 virtual void ActivatePanel() OVERRIDE;
40 virtual void DeactivatePanel() OVERRIDE; 42 virtual void DeactivatePanel() OVERRIDE;
41 virtual bool IsPanelActive() const OVERRIDE; 43 virtual bool IsPanelActive() const OVERRIDE;
42 virtual gfx::NativeWindow GetNativePanelHandle() OVERRIDE; 44 virtual gfx::NativeWindow GetNativePanelHandle() OVERRIDE;
43 virtual void UpdatePanelTitleBar() OVERRIDE; 45 virtual void UpdatePanelTitleBar() OVERRIDE;
44 virtual void ShowTaskManagerForPanel() OVERRIDE; 46 virtual void ShowTaskManagerForPanel() OVERRIDE;
45 virtual void NotifyPanelOnUserChangedTheme() OVERRIDE; 47 virtual void NotifyPanelOnUserChangedTheme() OVERRIDE;
46 virtual void DrawAttention() OVERRIDE; 48 virtual void DrawAttention() OVERRIDE;
47 virtual bool IsDrawingAttention() const OVERRIDE; 49 virtual bool IsDrawingAttention() const OVERRIDE;
48 virtual Browser* GetPanelBrowser() const OVERRIDE; 50 virtual Browser* GetPanelBrowser() const OVERRIDE;
49 virtual void DestroyPanelBrowser() OVERRIDE; 51 virtual void DestroyPanelBrowser() OVERRIDE;
52 virtual gfx::Size GetNonClientAreaSize() const OVERRIDE;
50 virtual NativePanelTesting* GetNativePanelTesting() OVERRIDE; 53 virtual NativePanelTesting* GetNativePanelTesting() OVERRIDE;
51 54
52 Panel* panel() { return panel_.get(); } 55 Panel* panel() { return panel_.get(); }
53 Browser* browser() const { return browser_.get(); } 56 Browser* browser() const { return browser_.get(); }
54 57
55 private: 58 private:
56 friend class PanelBrowserWindowCocoaTest; 59 friend class PanelBrowserWindowCocoaTest;
57 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, CreateClose); 60 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, CreateClose);
58 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, NativeBounds); 61 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, NativeBounds);
59 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewCreate); 62 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewCreate);
60 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewSizing); 63 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewSizing);
61 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewClose); 64 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewClose);
62 65
63 bool isClosed(); 66 bool isClosed();
64 67
65 scoped_ptr<Browser> browser_; 68 scoped_ptr<Browser> browser_;
66 scoped_ptr<Panel> panel_; 69 scoped_ptr<Panel> panel_;
67 gfx::Rect bounds_; 70 gfx::Rect bounds_;
68 PanelWindowControllerCocoa* controller_; // Weak, owns us. 71 PanelWindowControllerCocoa* controller_; // Weak, owns us.
69 bool is_shown_; // Panel is hidden on creation, Show() changes that forever. 72 bool is_shown_; // Panel is hidden on creation, Show() changes that forever.
70 73
71 DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowCocoa); 74 DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowCocoa);
72 }; 75 };
73 76
74 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_COCOA_H_ 77 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698