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 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h" | 5 #import "chrome/browser/ui/cocoa/extensions/extension_action_context_menu.h" |
6 | 6 |
| 7 #include "base/prefs/public/pref_change_registrar.h" |
7 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
8 #include "chrome/browser/api/prefs/pref_change_registrar.h" | |
9 #include "chrome/browser/extensions/extension_action.h" | 9 #include "chrome/browser/extensions/extension_action.h" |
10 #include "chrome/browser/extensions/extension_action_manager.h" | 10 #include "chrome/browser/extensions/extension_action_manager.h" |
11 #include "chrome/browser/extensions/extension_service.h" | 11 #include "chrome/browser/extensions/extension_service.h" |
12 #include "chrome/browser/extensions/extension_tab_util.h" | 12 #include "chrome/browser/extensions/extension_tab_util.h" |
13 #include "chrome/browser/extensions/extension_uninstall_dialog.h" | 13 #include "chrome/browser/extensions/extension_uninstall_dialog.h" |
14 #include "chrome/browser/prefs/pref_service.h" | 14 #include "chrome/browser/prefs/pref_service.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/browser/ui/browser_finder.h" | 17 #include "chrome/browser/ui/browser_finder.h" |
18 #include "chrome/browser/ui/browser_tabstrip.h" | 18 #include "chrome/browser/ui/browser_tabstrip.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 - (BOOL)validateMenuItem:(NSMenuItem*)menuItem { | 198 - (BOOL)validateMenuItem:(NSMenuItem*)menuItem { |
199 if ([menuItem tag] == kExtensionContextOptions) { | 199 if ([menuItem tag] == kExtensionContextOptions) { |
200 // Disable 'Options' if there are no options to set. | 200 // Disable 'Options' if there are no options to set. |
201 return extension_->options_url().spec().length() > 0; | 201 return extension_->options_url().spec().length() > 0; |
202 } | 202 } |
203 return YES; | 203 return YES; |
204 } | 204 } |
205 | 205 |
206 @end | 206 @end |
OLD | NEW |