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 #include "chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h" | 5 #include "chrome/browser/ui/cocoa/tab_contents/render_view_context_menu_mac.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/mac/scoped_nsobject.h" |
8 #import "base/mac/scoped_sending_event.h" | 9 #import "base/mac/scoped_sending_event.h" |
9 #include "base/memory/scoped_nsobject.h" | |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/strings/sys_string_conversions.h" | 11 #include "base/strings/sys_string_conversions.h" |
12 #include "chrome/app/chrome_command_ids.h" | 12 #include "chrome/app/chrome_command_ids.h" |
13 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 13 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
14 #include "content/public/browser/render_view_host.h" | 14 #include "content/public/browser/render_view_host.h" |
15 #include "content/public/browser/render_widget_host_view.h" | 15 #include "content/public/browser/render_widget_host_view.h" |
16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
17 #import "ui/base/cocoa/menu_controller.h" | 17 #import "ui/base/cocoa/menu_controller.h" |
18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
19 | 19 |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 command_id); | 279 command_id); |
280 if (!item) | 280 if (!item) |
281 return; | 281 return; |
282 | 282 |
283 // Update the returned NSMenuItem directly so we can update it immediately. | 283 // Update the returned NSMenuItem directly so we can update it immediately. |
284 [item setEnabled:enabled]; | 284 [item setEnabled:enabled]; |
285 [item setTitle:SysUTF16ToNSString(title)]; | 285 [item setTitle:SysUTF16ToNSString(title)]; |
286 [item setHidden:hidden]; | 286 [item setHidden:hidden]; |
287 [[item menu] itemChanged:item]; | 287 [[item menu] itemChanged:item]; |
288 } | 288 } |
OLD | NEW |