| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 // The panel can be minimized to 4-pixel lines. | 57 // The panel can be minimized to 4-pixel lines. |
| 58 static const int kMinimizedPanelHeight = 4; | 58 static const int kMinimizedPanelHeight = 4; |
| 59 | 59 |
| 60 virtual ~Panel(); | 60 virtual ~Panel(); |
| 61 | 61 |
| 62 // Returns the PanelManager associated with this panel. | 62 // Returns the PanelManager associated with this panel. |
| 63 PanelManager* manager() const; | 63 PanelManager* manager() const; |
| 64 | 64 |
| 65 // Gets the extension that a panel is created from. | |
| 66 // Returns NULL if it cannot be found. | |
| 67 const Extension* GetExtension() const; | |
| 68 | |
| 69 void SetExpansionState(ExpansionState new_expansion_state); | 65 void SetExpansionState(ExpansionState new_expansion_state); |
| 70 | 66 |
| 71 bool IsDrawingAttention() const; | 67 bool IsDrawingAttention() const; |
| 72 | 68 |
| 73 // This function will only get called by PanelManager when full screen mode | 69 // This function will only get called by PanelManager when full screen mode |
| 74 // changes i.e it gets called when an app goes into full screen mode or when | 70 // changes i.e it gets called when an app goes into full screen mode or when |
| 75 // an app exits full screen mode. Panel should respond by making sure | 71 // an app exits full screen mode. Panel should respond by making sure |
| 76 // a) it does not go on top when some app enters full screen mode. | 72 // a) it does not go on top when some app enters full screen mode. |
| 77 // b) it remains on top when an app exits full screen mode. | 73 // b) it remains on top when an app exits full screen mode. |
| 78 void FullScreenModeChanged(bool is_full_screen); | 74 void FullScreenModeChanged(bool is_full_screen); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 virtual void Observe(int type, | 211 virtual void Observe(int type, |
| 216 const content::NotificationSource& source, | 212 const content::NotificationSource& source, |
| 217 const content::NotificationDetails& details) OVERRIDE; | 213 const content::NotificationDetails& details) OVERRIDE; |
| 218 | 214 |
| 219 // Construct a native panel BrowserWindow implementation for the specified | 215 // Construct a native panel BrowserWindow implementation for the specified |
| 220 // |browser|. | 216 // |browser|. |
| 221 static NativePanel* CreateNativePanel(Browser* browser, | 217 static NativePanel* CreateNativePanel(Browser* browser, |
| 222 Panel* panel, | 218 Panel* panel, |
| 223 const gfx::Rect& bounds); | 219 const gfx::Rect& bounds); |
| 224 | 220 |
| 225 // Gets the extension from the browser that a panel is created from. | |
| 226 // Returns NULL if it cannot be found. | |
| 227 static const Extension* GetExtensionFromBrowser(Browser* browser); | |
| 228 | |
| 229 // Invoked when the native panel has detected a mouse click on the | 221 // Invoked when the native panel has detected a mouse click on the |
| 230 // panel's titlebar. Behavior of the click may be modified as | 222 // panel's titlebar. Behavior of the click may be modified as |
| 231 // indicated by |modifier|. | 223 // indicated by |modifier|. |
| 232 void OnTitlebarClicked(panel::ClickModifier modifier); | 224 void OnTitlebarClicked(panel::ClickModifier modifier); |
| 233 | 225 |
| 234 // Used on platforms where the panel cannot determine its window size | 226 // Used on platforms where the panel cannot determine its window size |
| 235 // until the window has been created. (e.g. GTK) | 227 // until the window has been created. (e.g. GTK) |
| 236 void OnWindowSizeAvailable(); | 228 void OnWindowSizeAvailable(); |
| 237 | 229 |
| 238 // Asynchronous completion of panel close request. | 230 // Asynchronous completion of panel close request. |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 AttentionMode attention_mode_; | 369 AttentionMode attention_mode_; |
| 378 | 370 |
| 379 ExpansionState expansion_state_; | 371 ExpansionState expansion_state_; |
| 380 | 372 |
| 381 content::NotificationRegistrar registrar_; | 373 content::NotificationRegistrar registrar_; |
| 382 | 374 |
| 383 DISALLOW_COPY_AND_ASSIGN(Panel); | 375 DISALLOW_COPY_AND_ASSIGN(Panel); |
| 384 }; | 376 }; |
| 385 | 377 |
| 386 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ | 378 #endif // CHROME_BROWSER_UI_PANELS_PANEL_H_ |
| OLD | NEW |