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_MENU_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 // an error. The caller takes ownership of the MenuItem. | 178 // an error. The caller takes ownership of the MenuItem. |
179 static MenuItem* Populate(const std::string& extension_id, | 179 static MenuItem* Populate(const std::string& extension_id, |
180 const DictionaryValue& value, | 180 const DictionaryValue& value, |
181 std::string* error); | 181 std::string* error); |
182 | 182 |
183 // Sets any document and target URL patterns from |properties|. | 183 // Sets any document and target URL patterns from |properties|. |
184 bool PopulateURLPatterns(const base::DictionaryValue& properties, | 184 bool PopulateURLPatterns(const base::DictionaryValue& properties, |
185 const char* document_url_patterns_key, | 185 const char* document_url_patterns_key, |
186 const char* target_url_patterns_key, | 186 const char* target_url_patterns_key, |
187 std::string* error); | 187 std::string* error); |
188 bool PopulateURLPatterns(ListValue* document_url_patterns, | |
189 ListValue* target_url_patterns, | |
not at google - send to devlin
2012/07/26 04:16:20
Just take const std::vector<std::string>* directly
chebert
2012/07/27 01:28:24
Done.
| |
190 std::string* error); | |
188 | 191 |
189 protected: | 192 protected: |
190 friend class MenuManager; | 193 friend class MenuManager; |
191 | 194 |
192 // Takes ownership of |item| and sets its parent_id_. | 195 // Takes ownership of |item| and sets its parent_id_. |
193 void AddChild(MenuItem* item); | 196 void AddChild(MenuItem* item); |
194 | 197 |
195 // Takes the child item from this parent. The item is returned and the caller | 198 // Takes the child item from this parent. The item is returned and the caller |
196 // then owns the pointer. | 199 // then owns the pointer. |
197 MenuItem* ReleaseChild(const Id& child_id, bool recursive); | 200 MenuItem* ReleaseChild(const Id& child_id, bool recursive); |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
346 ExtensionIconManager icon_manager_; | 349 ExtensionIconManager icon_manager_; |
347 | 350 |
348 Profile* profile_; | 351 Profile* profile_; |
349 | 352 |
350 DISALLOW_COPY_AND_ASSIGN(MenuManager); | 353 DISALLOW_COPY_AND_ASSIGN(MenuManager); |
351 }; | 354 }; |
352 | 355 |
353 } // namespace extensions | 356 } // namespace extensions |
354 | 357 |
355 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ | 358 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ |
OLD | NEW |