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