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_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_H_ |
6 #define CHROME_BROWSER_UI_PANELS_PANEL_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
10 | 10 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 // Construct a native panel BrowserWindow implementation for the specified | 169 // Construct a native panel BrowserWindow implementation for the specified |
170 // |browser|. | 170 // |browser|. |
171 static NativePanel* CreateNativePanel(Browser* browser, | 171 static NativePanel* CreateNativePanel(Browser* browser, |
172 Panel* panel, | 172 Panel* panel, |
173 const gfx::Rect& bounds); | 173 const gfx::Rect& bounds); |
174 | 174 |
175 // Gets the extension from the browser that a panel is created from. | 175 // Gets the extension from the browser that a panel is created from. |
176 // Returns NULL if it cannot be found. | 176 // Returns NULL if it cannot be found. |
177 static const Extension* GetExtensionFromBrowser(Browser* browser); | 177 static const Extension* GetExtensionFromBrowser(Browser* browser); |
178 | 178 |
| 179 // Used on platforms where the panel cannot determine its non-client area |
| 180 // until the window has been created. (e.g. GTK) |
| 181 void OnNonClientExtentAvailable(); |
| 182 |
179 NativePanel* native_panel() { return native_panel_; } | 183 NativePanel* native_panel() { return native_panel_; } |
180 Browser* browser() const; | 184 Browser* browser() const; |
181 ExpansionState expansion_state() const { return expansion_state_; } | 185 ExpansionState expansion_state() const { return expansion_state_; } |
182 const gfx::Size& min_size() const { return min_size_; } | 186 const gfx::Size& min_size() const { return min_size_; } |
183 const gfx::Size& max_size() const { return max_size_; } | 187 const gfx::Size& max_size() const { return max_size_; } |
184 | 188 |
185 protected: | 189 protected: |
186 virtual void DestroyBrowser() OVERRIDE; | 190 virtual void DestroyBrowser() OVERRIDE; |
187 | 191 |
188 private: | 192 private: |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 NativePanel* native_panel_; // Weak, owns us. | 224 NativePanel* native_panel_; // Weak, owns us. |
221 | 225 |
222 ExpansionState expansion_state_; | 226 ExpansionState expansion_state_; |
223 | 227 |
224 NotificationRegistrar registrar_; | 228 NotificationRegistrar registrar_; |
225 | 229 |
226 DISALLOW_COPY_AND_ASSIGN(Panel); | 230 DISALLOW_COPY_AND_ASSIGN(Panel); |
227 }; | 231 }; |
228 | 232 |
229 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ | 233 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ |
OLD | NEW |