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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 | 73 |
74 // Return an id uniquely identifying the window. | 74 // Return an id uniquely identifying the window. |
75 virtual int GetWindowId() const = 0; | 75 virtual int GetWindowId() const = 0; |
76 | 76 |
77 // Return the type name for the window. | 77 // Return the type name for the window. |
78 virtual std::string GetWindowTypeText() const = 0; | 78 virtual std::string GetWindowTypeText() const = 0; |
79 | 79 |
80 // Populates a dictionary for the Window object. Override this to set | 80 // Populates a dictionary for the Window object. Override this to set |
81 // implementation specific properties (call the base implementation first to | 81 // implementation specific properties (call the base implementation first to |
82 // set common properties). | 82 // set common properties). |
83 virtual base::DictionaryValue* CreateWindowValue() const; | 83 std::unique_ptr<base::DictionaryValue> CreateWindowValue() const; |
dcheng
2016/05/19 03:40:25
Devirtualized, because none of the overloads did a
| |
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 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(...) | 93 // DEPRECATED: Use std::unique_ptr<api::tabs::Tab> CreateTabObject(...) |
94 virtual base::DictionaryValue* CreateTabValue( | 94 virtual base::DictionaryValue* CreateTabValue( |
95 const extensions::Extension* extension, int tab_index) const = 0; | 95 const extensions::Extension* extension, int tab_index) const = 0; |
96 | 96 |
(...skipping 20 matching lines...) Expand all Loading... | |
117 private: | 117 private: |
118 ui::BaseWindow* window_; | 118 ui::BaseWindow* window_; |
119 Profile* profile_; | 119 Profile* profile_; |
120 | 120 |
121 DISALLOW_COPY_AND_ASSIGN(WindowController); | 121 DISALLOW_COPY_AND_ASSIGN(WindowController); |
122 }; | 122 }; |
123 | 123 |
124 } // namespace extensions | 124 } // namespace extensions |
125 | 125 |
126 #endif // CHROME_BROWSER_EXTENSIONS_WINDOW_CONTROLLER_H_ | 126 #endif // CHROME_BROWSER_EXTENSIONS_WINDOW_CONTROLLER_H_ |
OLD | NEW |