Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / extensions / api / tabs / app_window_controller.h
blob92979b838be3a37b43a909a3fbfcca103141fba1
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_
8 #include <string>
10 #include "base/basictypes.h"
11 #include "base/containers/scoped_ptr_hash_map.h"
12 #include "chrome/browser/extensions/window_controller.h"
14 class Profile;
16 namespace extensions {
18 class AppWindow;
19 class AppBaseWindow;
21 // A extensions::WindowController specific to extensions::AppWindow.
22 class AppWindowController : public WindowController {
23 public:
24 AppWindowController(AppWindow* window,
25 scoped_ptr<AppBaseWindow> base_window,
26 Profile* profile);
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;
42 private:
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_