Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: chrome/browser/extensions/menu_manager.h

Issue 10809094: Context Menus now uses the JSON Schema Compiler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@json_functions_as_properties
Patch Set: made some minor changes Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // Converts to Value for serialization to preferences. 174 // Converts to Value for serialization to preferences.
175 scoped_ptr<base::DictionaryValue> ToValue() const; 175 scoped_ptr<base::DictionaryValue> ToValue() const;
176 176
177 // Returns a new MenuItem created from |value|, or NULL if there is 177 // Returns a new MenuItem created from |value|, or NULL if there is
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(std::vector<std::string>* document_url_patterns,
185 const char* document_url_patterns_key, 185 std::vector<std::string>* target_url_patterns,
186 const char* target_url_patterns_key,
187 std::string* error); 186 std::string* error);
188 187
189 protected: 188 protected:
190 friend class MenuManager; 189 friend class MenuManager;
191 190
192 // Takes ownership of |item| and sets its parent_id_. 191 // Takes ownership of |item| and sets its parent_id_.
193 void AddChild(MenuItem* item); 192 void AddChild(MenuItem* item);
194 193
195 // Takes the child item from this parent. The item is returned and the caller 194 // Takes the child item from this parent. The item is returned and the caller
196 // then owns the pointer. 195 // then owns the pointer.
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 ExtensionIconManager icon_manager_; 345 ExtensionIconManager icon_manager_;
347 346
348 Profile* profile_; 347 Profile* profile_;
349 348
350 DISALLOW_COPY_AND_ASSIGN(MenuManager); 349 DISALLOW_COPY_AND_ASSIGN(MenuManager);
351 }; 350 };
352 351
353 } // namespace extensions 352 } // namespace extensions
354 353
355 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ 354 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698