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_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 24 matching lines...) Expand all Loading... | |
35 Panel::ExpansionState expansion_state) OVERRIDE; | 35 Panel::ExpansionState expansion_state) OVERRIDE; |
36 virtual bool ShouldBringUpPanelTitleBar(int mouse_x, | 36 virtual bool ShouldBringUpPanelTitleBar(int mouse_x, |
37 int mouse_y) const OVERRIDE; | 37 int mouse_y) const OVERRIDE; |
38 virtual void ClosePanel() OVERRIDE; | 38 virtual void ClosePanel() OVERRIDE; |
39 virtual void ActivatePanel() OVERRIDE; | 39 virtual void ActivatePanel() OVERRIDE; |
40 virtual void DeactivatePanel() OVERRIDE; | 40 virtual void DeactivatePanel() OVERRIDE; |
41 virtual bool IsPanelActive() const OVERRIDE; | 41 virtual bool IsPanelActive() const OVERRIDE; |
42 virtual gfx::NativeWindow GetNativePanelHandle() OVERRIDE; | 42 virtual gfx::NativeWindow GetNativePanelHandle() OVERRIDE; |
43 virtual void UpdatePanelTitleBar() OVERRIDE; | 43 virtual void UpdatePanelTitleBar() OVERRIDE; |
44 virtual void ShowTaskManagerForPanel() OVERRIDE; | 44 virtual void ShowTaskManagerForPanel() OVERRIDE; |
45 virtual FindBar* CreatePanelFindBar() OVERRIDE; | |
45 virtual void NotifyPanelOnUserChangedTheme() OVERRIDE; | 46 virtual void NotifyPanelOnUserChangedTheme() OVERRIDE; |
46 virtual void DrawAttention() OVERRIDE; | 47 virtual void DrawAttention() OVERRIDE; |
47 virtual bool IsDrawingAttention() const OVERRIDE; | 48 virtual bool IsDrawingAttention() const OVERRIDE; |
48 virtual Browser* GetPanelBrowser() const OVERRIDE; | 49 virtual Browser* GetPanelBrowser() const OVERRIDE; |
49 virtual void DestroyPanelBrowser() OVERRIDE; | 50 virtual void DestroyPanelBrowser() OVERRIDE; |
50 virtual NativePanelTesting* GetNativePanelTesting() OVERRIDE; | 51 virtual NativePanelTesting* GetNativePanelTesting() OVERRIDE; |
51 | 52 |
52 Panel* panel() { return panel_.get(); } | 53 Panel* panel() { return panel_.get(); } |
53 Browser* browser() const { return browser_.get(); } | 54 Browser* browser() const { return browser_.get(); } |
54 | 55 |
55 private: | 56 private: |
56 friend class PanelBrowserWindowCocoaTest; | 57 friend class PanelBrowserWindowCocoaTest; |
57 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, CreateClose); | 58 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, CreateClose); |
58 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, NativeBounds); | 59 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, NativeBounds); |
59 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewCreate); | 60 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewCreate); |
60 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewSizing); | 61 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewSizing); |
61 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewClose); | 62 FRIEND_TEST_ALL_PREFIXES(PanelBrowserWindowCocoaTest, TitlebarViewClose); |
62 | 63 |
63 bool isClosed(); | 64 bool isClosed(); |
64 | 65 |
65 scoped_ptr<Browser> browser_; | 66 scoped_ptr<Browser> browser_; |
66 scoped_ptr<Panel> panel_; | 67 scoped_ptr<Panel> panel_; |
67 gfx::Rect bounds_; | 68 gfx::Rect bounds_; |
68 PanelWindowControllerCocoa* controller_; // Weak, owns us. | 69 PanelWindowControllerCocoa* controller_; // Weak, owns us. |
69 bool is_shown_; // Panel is hidden on creation, Show() changes that forever. | 70 bool is_shown_; // Panel is hidden on creation, Show() changes that forever. |
71 bool has_find_bar_; // Find bar should only be created once per panel. | |
Dmitry Titov
2011/08/08 20:08:31
Can we make this data member that is only used in
jennb
2011/08/08 21:21:21
As discussed, will not change. DCHECK is not the s
| |
70 | 72 |
71 DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowCocoa); | 73 DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowCocoa); |
72 }; | 74 }; |
73 | 75 |
74 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_COCOA_H_ | 76 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_COCOA_H_ |
OLD | NEW |