| 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_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // This class manages a set of panels. | 27 // This class manages a set of panels. |
| 28 class PanelManager : public DisplaySettingsProvider::DisplayAreaObserver, | 28 class PanelManager : public DisplaySettingsProvider::DisplayAreaObserver, |
| 29 public DisplaySettingsProvider::FullScreenObserver { | 29 public DisplaySettingsProvider::FullScreenObserver { |
| 30 public: | 30 public: |
| 31 // Returns a single instance. | 31 // Returns a single instance. |
| 32 static PanelManager* GetInstance(); | 32 static PanelManager* GetInstance(); |
| 33 | 33 |
| 34 // Returns true if panels should be used for the extension. | 34 // Returns true if panels should be used for the extension. |
| 35 static bool ShouldUsePanels(const std::string& extension_id); | 35 static bool ShouldUsePanels(const std::string& extension_id); |
| 36 | 36 |
| 37 // Returns true if using browserless panels. False if using old panels. |
| 38 // TODO(jennb): Delete after refactor. |
| 39 static bool UseBrowserlessPanels(); |
| 40 |
| 37 // Creates a panel and returns it. The panel might be queued for display | 41 // Creates a panel and returns it. The panel might be queued for display |
| 38 // later. | 42 // later. |
| 39 // |app_name| is the default title for Panels when the page content does not | 43 // |app_name| is the default title for Panels when the page content does not |
| 40 // provide a title. For extensions, this is usually the application name | 44 // provide a title. For extensions, this is usually the application name |
| 41 // generated from the extension id. | 45 // generated from the extension id. |
| 42 // |requested_size| is the desired size for the panel, but actual | 46 // |requested_size| is the desired size for the panel, but actual |
| 43 // size may differ after panel layout. | 47 // size may differ after panel layout. |
| 44 Panel* CreatePanel(const std::string& app_name, | 48 Panel* CreatePanel(const std::string& app_name, |
| 45 Profile* profile, | 49 Profile* profile, |
| 46 const GURL& url, | 50 const GURL& url, |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 204 |
| 201 // Whether or not bounds will be updated when the preferred content size is | 205 // Whether or not bounds will be updated when the preferred content size is |
| 202 // changed. The testing code could set this flag to false so that other tests | 206 // changed. The testing code could set this flag to false so that other tests |
| 203 // will not be affected. | 207 // will not be affected. |
| 204 bool auto_sizing_enabled_; | 208 bool auto_sizing_enabled_; |
| 205 | 209 |
| 206 DISALLOW_COPY_AND_ASSIGN(PanelManager); | 210 DISALLOW_COPY_AND_ASSIGN(PanelManager); |
| 207 }; | 211 }; |
| 208 | 212 |
| 209 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ | 213 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
| OLD | NEW |