1 // Copyright 2015 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.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TABS_APP_WINDOW_CONTROLLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_APP_WINDOW_CONTROLLER_H_
10 #include "base/basictypes.h"
11 #include "base/containers/scoped_ptr_hash_map.h"
12 #include "chrome/browser/extensions/window_controller.h"
16 namespace extensions
{
21 // A extensions::WindowController specific to extensions::AppWindow.
22 class AppWindowController
: public WindowController
{
24 AppWindowController(AppWindow
* window
,
25 scoped_ptr
<AppBaseWindow
> base_window
,
27 ~AppWindowController() override
;
29 // extensions::WindowController:
30 int GetWindowId() const override
;
31 std::string
GetWindowTypeText() const override
;
32 base::DictionaryValue
* CreateWindowValueWithTabs(
33 const Extension
* extension
) const override
;
34 base::DictionaryValue
* CreateTabValue(const Extension
* extension
,
35 int tab_index
) const override
;
36 bool CanClose(Reason
* reason
) const override
;
37 void SetFullscreenMode(bool is_fullscreen
,
38 const GURL
& extension_url
) const override
;
39 Browser
* GetBrowser() const override
;
40 bool IsVisibleToExtension(const Extension
* extension
) const override
;
43 AppWindow
* app_window_
; // Owns us.
44 scoped_ptr
<AppBaseWindow
> base_window_
;
46 DISALLOW_COPY_AND_ASSIGN(AppWindowController
);
49 } // namespace extensions
51 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_APP_WINDOW_CONTROLLER_H_