| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_API_TABS_APP_WINDOW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TABS_APP_WINDOW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_APP_WINDOW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_APP_WINDOW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/containers/scoped_ptr_hash_map.h" | 10 #include "base/containers/scoped_ptr_hash_map.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "chrome/browser/extensions/window_controller.h" | 12 #include "chrome/browser/extensions/window_controller.h" |
| 13 | 13 |
| 14 class Profile; | 14 class Profile; |
| 15 | 15 |
| 16 namespace extensions { | 16 namespace extensions { |
| 17 | 17 |
| 18 class AppWindow; | 18 class AppWindow; |
| 19 class AppBaseWindow; | 19 class AppBaseWindow; |
| 20 | 20 |
| 21 // A extensions::WindowController specific to extensions::AppWindow. | 21 // A extensions::WindowController specific to extensions::AppWindow. |
| 22 class AppWindowController : public WindowController { | 22 class AppWindowController : public WindowController { |
| 23 public: | 23 public: |
| 24 AppWindowController(AppWindow* window, | 24 AppWindowController(AppWindow* window, |
| 25 scoped_ptr<AppBaseWindow> base_window, | 25 std::unique_ptr<AppBaseWindow> base_window, |
| 26 Profile* profile); | 26 Profile* profile); |
| 27 ~AppWindowController() override; | 27 ~AppWindowController() override; |
| 28 | 28 |
| 29 // extensions::WindowController: | 29 // extensions::WindowController: |
| 30 int GetWindowId() const override; | 30 int GetWindowId() const override; |
| 31 std::string GetWindowTypeText() const override; | 31 std::string GetWindowTypeText() const override; |
| 32 base::DictionaryValue* CreateWindowValueWithTabs( | 32 base::DictionaryValue* CreateWindowValueWithTabs( |
| 33 const Extension* extension) const override; | 33 const Extension* extension) const override; |
| 34 base::DictionaryValue* CreateTabValue(const Extension* extension, | 34 base::DictionaryValue* CreateTabValue(const Extension* extension, |
| 35 int tab_index) const override; | 35 int tab_index) const override; |
| 36 scoped_ptr<api::tabs::Tab> CreateTabObject( | 36 std::unique_ptr<api::tabs::Tab> CreateTabObject( |
| 37 const extensions::Extension* extension, | 37 const extensions::Extension* extension, |
| 38 int tab_index) const override; | 38 int tab_index) const override; |
| 39 | 39 |
| 40 bool CanClose(Reason* reason) const override; | 40 bool CanClose(Reason* reason) const override; |
| 41 void SetFullscreenMode(bool is_fullscreen, | 41 void SetFullscreenMode(bool is_fullscreen, |
| 42 const GURL& extension_url) const override; | 42 const GURL& extension_url) const override; |
| 43 Browser* GetBrowser() const override; | 43 Browser* GetBrowser() const override; |
| 44 bool IsVisibleToExtension(const Extension* extension) const override; | 44 bool IsVisibleToExtension(const Extension* extension) const override; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 AppWindow* app_window_; // Owns us. | 47 AppWindow* app_window_; // Owns us. |
| 48 scoped_ptr<AppBaseWindow> base_window_; | 48 std::unique_ptr<AppBaseWindow> base_window_; |
| 49 | 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(AppWindowController); | 50 DISALLOW_COPY_AND_ASSIGN(AppWindowController); |
| 51 }; | 51 }; |
| 52 | 52 |
| 53 } // namespace extensions | 53 } // namespace extensions |
| 54 | 54 |
| 55 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_APP_WINDOW_CONTROLLER_H_ | 55 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_APP_WINDOW_CONTROLLER_H_ |
| OLD | NEW |