OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 // Moves the panel to the |new_strip|, removing the panel from its | 226 // Moves the panel to the |new_strip|, removing the panel from its |
227 // current strip. | 227 // current strip. |
228 void MoveToStrip(PanelStrip* new_strip); | 228 void MoveToStrip(PanelStrip* new_strip); |
229 | 229 |
230 ExpansionState expansion_state() const { return expansion_state_; } | 230 ExpansionState expansion_state() const { return expansion_state_; } |
231 ExpansionState old_expansion_state() const { return old_expansion_state_; } | 231 ExpansionState old_expansion_state() const { return old_expansion_state_; } |
232 const gfx::Size& min_size() const { return min_size_; } | 232 const gfx::Size& min_size() const { return min_size_; } |
233 const gfx::Size& max_size() const { return max_size_; } | 233 const gfx::Size& max_size() const { return max_size_; } |
234 bool auto_resizable() const { return auto_resizable_; } | 234 bool auto_resizable() const { return auto_resizable_; } |
235 | 235 |
236 bool draggable() const { return draggable_; } | |
237 void set_draggable(bool can_drag) { draggable_ = can_drag; } | |
238 | |
239 // The restored size is the size of the panel when it is expanded. | 236 // The restored size is the size of the panel when it is expanded. |
240 gfx::Size restored_size() const { return restored_size_; } | 237 gfx::Size restored_size() const { return restored_size_; } |
241 void set_restored_size(const gfx::Size& size) { restored_size_ = size; } | 238 void set_restored_size(const gfx::Size& size) { restored_size_ = size; } |
242 | 239 |
243 // Panel must be initialized to be "fully created" and ready for use. | 240 // Panel must be initialized to be "fully created" and ready for use. |
244 // Only called by PanelManager. | 241 // Only called by PanelManager. |
245 bool initialized() const { return initialized_; } | 242 bool initialized() const { return initialized_; } |
246 void Initialize(const gfx::Rect& bounds); | 243 void Initialize(const gfx::Rect& bounds); |
247 | 244 |
248 // This is different from BrowserWindow::SetBounds(): | 245 // This is different from BrowserWindow::SetBounds(): |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 // This is the minimum size that the panel can shrink to. | 306 // This is the minimum size that the panel can shrink to. |
310 gfx::Size min_size_; | 307 gfx::Size min_size_; |
311 | 308 |
312 // This is the size beyond which the panel is not going to grow to accomodate | 309 // This is the size beyond which the panel is not going to grow to accomodate |
313 // the growing content and WebKit would add the scrollbars in such case. | 310 // the growing content and WebKit would add the scrollbars in such case. |
314 gfx::Size max_size_; | 311 gfx::Size max_size_; |
315 | 312 |
316 // True if this panel auto resizes based on content. | 313 // True if this panel auto resizes based on content. |
317 bool auto_resizable_; | 314 bool auto_resizable_; |
318 | 315 |
319 // True if this panel can be dragged. | |
320 bool draggable_; | |
321 | |
322 // Platform specifc implementation for panels. It'd be one of | 316 // Platform specifc implementation for panels. It'd be one of |
323 // PanelBrowserWindowGtk/PanelBrowserView/PanelBrowserWindowCocoa. | 317 // PanelBrowserWindowGtk/PanelBrowserView/PanelBrowserWindowCocoa. |
324 NativePanel* native_panel_; // Weak, owns us. | 318 NativePanel* native_panel_; // Weak, owns us. |
325 | 319 |
326 ExpansionState expansion_state_; | 320 ExpansionState expansion_state_; |
327 ExpansionState old_expansion_state_; | 321 ExpansionState old_expansion_state_; |
328 | 322 |
329 // Indicates whether the panel app icon is visible in the taskbar. | 323 // Indicates whether the panel app icon is visible in the taskbar. |
330 bool app_icon_visible_; | 324 bool app_icon_visible_; |
331 | 325 |
332 content::NotificationRegistrar registrar_; | 326 content::NotificationRegistrar registrar_; |
333 | 327 |
334 DISALLOW_COPY_AND_ASSIGN(Panel); | 328 DISALLOW_COPY_AND_ASSIGN(Panel); |
335 }; | 329 }; |
336 | 330 |
337 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ | 331 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ |
OLD | NEW |