OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/extensions/extension_context_menu_api.h" | 5 #include "chrome/browser/extensions/extension_context_menu_api.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "chrome/browser/extensions/extensions_service.h" | 12 #include "chrome/browser/extensions/extensions_service.h" |
13 #include "chrome/browser/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/common/extensions/extension_error_utils.h" | 14 #include "chrome/common/extensions/extension_error_utils.h" |
15 | 15 |
16 const char kCheckedKey[] = "checked"; | 16 const char kCheckedKey[] = "checked"; |
17 const char kContextsKey[] = "contexts"; | 17 const char kContextsKey[] = "contexts"; |
18 const char kDocumentUrlPatternsKey[] = "documentUrlPatterns"; | 18 const char kDocumentUrlPatternsKey[] = "documentUrlPatterns"; |
19 const char kGeneratedIdKey[] = "generatedId"; | 19 const char kGeneratedIdKey[] = "generatedId"; |
20 const char kParentIdKey[] = "parentId"; | 20 const char kParentIdKey[] = "parentId"; |
21 const char kTargetUrlPatternsKey[] = "targetUrlPatterns"; | 21 const char kTargetUrlPatternsKey[] = "targetUrlPatterns"; |
22 const char kTitleKey[] = "title"; | 22 const char kTitleKey[] = "title"; |
23 const char kTypeKey[] = "type"; | 23 const char kTypeKey[] = "type"; |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 | 347 |
348 return manager->RemoveContextMenuItem(id); | 348 return manager->RemoveContextMenuItem(id); |
349 } | 349 } |
350 | 350 |
351 bool RemoveAllContextMenusFunction::RunImpl() { | 351 bool RemoveAllContextMenusFunction::RunImpl() { |
352 ExtensionsService* service = profile()->GetExtensionsService(); | 352 ExtensionsService* service = profile()->GetExtensionsService(); |
353 ExtensionMenuManager* manager = service->menu_manager(); | 353 ExtensionMenuManager* manager = service->menu_manager(); |
354 manager->RemoveAllContextItems(extension_id()); | 354 manager->RemoveAllContextItems(extension_id()); |
355 return true; | 355 return true; |
356 } | 356 } |
OLD | NEW |