[email protected] | 41d9faf | 2012-02-28 23:46:02 | [diff] [blame] | 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 | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef CHROME_BROWSER_EXTENSIONS_BROWSER_EXTENSION_WINDOW_CONTROLLER_H_ | ||||
6 | #define CHROME_BROWSER_EXTENSIONS_BROWSER_EXTENSION_WINDOW_CONTROLLER_H_ | ||||
[email protected] | 41d9faf | 2012-02-28 23:46:02 | [diff] [blame] | 7 | |
avi | a2f4804a | 2015-12-24 23:11:13 | [diff] [blame] | 8 | #include "base/macros.h" |
[email protected] | 44f4b13 | 2012-07-17 20:36:57 | [diff] [blame] | 9 | #include "chrome/browser/extensions/window_controller.h" |
[email protected] | 41d9faf | 2012-02-28 23:46:02 | [diff] [blame] | 10 | |
11 | class Browser; | ||||
Devlin Cronin | ad230bb | 2018-05-30 18:41:46 | [diff] [blame] | 12 | class GURL; |
[email protected] | 41d9faf | 2012-02-28 23:46:02 | [diff] [blame] | 13 | |
[email protected] | f34706be | 2012-09-04 07:32:09 | [diff] [blame] | 14 | namespace extensions { |
15 | class Extension; | ||||
[email protected] | f34706be | 2012-09-04 07:32:09 | [diff] [blame] | 16 | |
Devlin Cronin | f78c7c44 | 2018-05-22 20:44:08 | [diff] [blame] | 17 | class BrowserExtensionWindowController : public WindowController { |
[email protected] | 41d9faf | 2012-02-28 23:46:02 | [diff] [blame] | 18 | public: |
19 | explicit BrowserExtensionWindowController(Browser* browser); | ||||
dcheng | ae36a4a | 2014-10-21 12:36:36 | [diff] [blame] | 20 | ~BrowserExtensionWindowController() override; |
[email protected] | 41d9faf | 2012-02-28 23:46:02 | [diff] [blame] | 21 | |
Devlin Cronin | ad230bb | 2018-05-30 18:41:46 | [diff] [blame] | 22 | // Sets the window's fullscreen state. |extension_url| provides the url |
23 | // associated with the extension (used by FullscreenController). | ||||
24 | void SetFullscreenMode(bool is_fullscreen, const GURL& extension_url) const; | ||||
25 | |||||
Devlin Cronin | f78c7c44 | 2018-05-22 20:44:08 | [diff] [blame] | 26 | // WindowController implementation. |
dcheng | ae36a4a | 2014-10-21 12:36:36 | [diff] [blame] | 27 | int GetWindowId() const override; |
28 | std::string GetWindowTypeText() const override; | ||||
dcheng | ae36a4a | 2014-10-21 12:36:36 | [diff] [blame] | 29 | bool CanClose(Reason* reason) const override; |
dcheng | ae36a4a | 2014-10-21 12:36:36 | [diff] [blame] | 30 | Browser* GetBrowser() const override; |
Devlin Cronin | f620cde | 2018-02-01 05:40:04 | [diff] [blame] | 31 | bool IsVisibleToTabsAPIForExtension( |
Devlin Cronin | f78c7c44 | 2018-05-22 20:44:08 | [diff] [blame] | 32 | const Extension* extension, |
Devlin Cronin | f620cde | 2018-02-01 05:40:04 | [diff] [blame] | 33 | bool allow_dev_tools_windows) const override; |
[email protected] | 41d9faf | 2012-02-28 23:46:02 | [diff] [blame] | 34 | |
35 | private: | ||||
Lei Zhang | 8bd9882c | 2017-11-28 21:24:08 | [diff] [blame] | 36 | Browser* const browser_; |
[email protected] | 41d9faf | 2012-02-28 23:46:02 | [diff] [blame] | 37 | |
38 | DISALLOW_COPY_AND_ASSIGN(BrowserExtensionWindowController); | ||||
39 | }; | ||||
40 | |||||
Devlin Cronin | f78c7c44 | 2018-05-22 20:44:08 | [diff] [blame] | 41 | } // namespace extensions |
42 | |||||
[email protected] | 41d9faf | 2012-02-28 23:46:02 | [diff] [blame] | 43 | #endif // CHROME_BROWSER_EXTENSIONS_BROWSER_EXTENSION_WINDOW_CONTROLLER_H_ |