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

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

Issue 11226037: Incognito-allowed package apps produce duplicate items in context menu (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixed unittest Created 8 years, 1 month 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 const content::NotificationDetails& details) OVERRIDE; 308 const content::NotificationDetails& details) OVERRIDE;
309 309
310 // Stores the menu items for the extension in the state storage. 310 // Stores the menu items for the extension in the state storage.
311 void WriteToStorage(const Extension* extension); 311 void WriteToStorage(const Extension* extension);
312 312
313 // Reads menu items for the extension from the state storage. Any invalid 313 // Reads menu items for the extension from the state storage. Any invalid
314 // items are ignored. 314 // items are ignored.
315 void ReadFromStorage(const std::string& extension_id, 315 void ReadFromStorage(const std::string& extension_id,
316 scoped_ptr<base::Value> value); 316 scoped_ptr<base::Value> value);
317 317
318 // Removes all "incognito" "split" mode context items.
319 void RemoveAllIncognitoContextItems();
320
318 private: 321 private:
319 FRIEND_TEST_ALL_PREFIXES(MenuManagerTest, DeleteParent); 322 FRIEND_TEST_ALL_PREFIXES(MenuManagerTest, DeleteParent);
320 FRIEND_TEST_ALL_PREFIXES(MenuManagerTest, RemoveOneByOne); 323 FRIEND_TEST_ALL_PREFIXES(MenuManagerTest, RemoveOneByOne);
321 324
322 // This is a helper function which takes care of de-selecting any other radio 325 // This is a helper function which takes care of de-selecting any other radio
323 // items in the same group (i.e. that are adjacent in the list). 326 // items in the same group (i.e. that are adjacent in the list).
324 void RadioItemSelected(MenuItem* item); 327 void RadioItemSelected(MenuItem* item);
325 328
326 // Make sure that there is only one radio item selected at once in any run. 329 // Make sure that there is only one radio item selected at once in any run.
327 // If there are no radio items selected, then the first item in the run 330 // If there are no radio items selected, then the first item in the run
(...skipping 18 matching lines...) Expand all
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_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_process_manager.cc ('k') | chrome/browser/extensions/menu_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698