| 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_EXTENSIONS_WINDOW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_WINDOW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_WINDOW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_WINDOW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 std::unique_ptr<base::DictionaryValue> CreateWindowValue() const; | 83 std::unique_ptr<base::DictionaryValue> CreateWindowValue() const; |
| 84 | 84 |
| 85 // Populates a dictionary for the Window object, including a list of tabs. | 85 // Populates a dictionary for the Window object, including a list of tabs. |
| 86 virtual std::unique_ptr<base::DictionaryValue> CreateWindowValueWithTabs( | 86 virtual std::unique_ptr<base::DictionaryValue> CreateWindowValueWithTabs( |
| 87 const extensions::Extension* extension) const = 0; | 87 const extensions::Extension* extension) const = 0; |
| 88 | 88 |
| 89 virtual std::unique_ptr<api::tabs::Tab> CreateTabObject( | 89 virtual std::unique_ptr<api::tabs::Tab> CreateTabObject( |
| 90 const extensions::Extension* extension, | 90 const extensions::Extension* extension, |
| 91 int tab_index) const = 0; | 91 int tab_index) const = 0; |
| 92 | 92 |
| 93 // DEPRECATED: Use std::unique_ptr<api::tabs::Tab> CreateTabObject(...) | |
| 94 virtual base::DictionaryValue* CreateTabValue( | |
| 95 const extensions::Extension* extension, int tab_index) const = 0; | |
| 96 | |
| 97 // Returns false if the window is in a state where closing the window is not | 93 // Returns false if the window is in a state where closing the window is not |
| 98 // permitted and sets |reason| if not NULL. | 94 // permitted and sets |reason| if not NULL. |
| 99 virtual bool CanClose(Reason* reason) const = 0; | 95 virtual bool CanClose(Reason* reason) const = 0; |
| 100 | 96 |
| 101 // Set the window's fullscreen state. |extension_url| provides the url | 97 // Set the window's fullscreen state. |extension_url| provides the url |
| 102 // associated with the extension (used by FullscreenController). | 98 // associated with the extension (used by FullscreenController). |
| 103 virtual void SetFullscreenMode(bool is_fullscreen, | 99 virtual void SetFullscreenMode(bool is_fullscreen, |
| 104 const GURL& extension_url) const = 0; | 100 const GURL& extension_url) const = 0; |
| 105 | 101 |
| 106 // Returns a Browser if available. Defaults to returning NULL. | 102 // Returns a Browser if available. Defaults to returning NULL. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 117 private: | 113 private: |
| 118 ui::BaseWindow* window_; | 114 ui::BaseWindow* window_; |
| 119 Profile* profile_; | 115 Profile* profile_; |
| 120 | 116 |
| 121 DISALLOW_COPY_AND_ASSIGN(WindowController); | 117 DISALLOW_COPY_AND_ASSIGN(WindowController); |
| 122 }; | 118 }; |
| 123 | 119 |
| 124 } // namespace extensions | 120 } // namespace extensions |
| 125 | 121 |
| 126 #endif // CHROME_BROWSER_EXTENSIONS_WINDOW_CONTROLLER_H_ | 122 #endif // CHROME_BROWSER_EXTENSIONS_WINDOW_CONTROLLER_H_ |
| OLD | NEW |