| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/menu_controller.h" | 5 #import "chrome/browser/ui/cocoa/menu_controller.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
| 9 #include "skia/ext/skia_utils_mac.h" | 9 #include "skia/ext/skia_utils_mac.h" |
| 10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
| 11 #include "ui/base/accelerators/accelerator_cocoa.h" |
| 11 #include "ui/base/l10n/l10n_util_mac.h" | 12 #include "ui/base/l10n/l10n_util_mac.h" |
| 12 #include "ui/base/models/accelerator_cocoa.h" | |
| 13 #include "ui/base/models/simple_menu_model.h" | 13 #include "ui/base/models/simple_menu_model.h" |
| 14 | 14 |
| 15 @interface MenuController (Private) | 15 @interface MenuController (Private) |
| 16 - (void)addSeparatorToMenu:(NSMenu*)menu | 16 - (void)addSeparatorToMenu:(NSMenu*)menu |
| 17 atIndex:(int)index; | 17 atIndex:(int)index; |
| 18 @end | 18 @end |
| 19 | 19 |
| 20 @implementation MenuController | 20 @implementation MenuController |
| 21 | 21 |
| 22 @synthesize model = model_; | 22 @synthesize model = model_; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 isMenuOpen_ = YES; | 204 isMenuOpen_ = YES; |
| 205 model_->MenuWillShow(); | 205 model_->MenuWillShow(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 - (void)menuDidClose:(NSMenu*)menu { | 208 - (void)menuDidClose:(NSMenu*)menu { |
| 209 model_->MenuClosed(); | 209 model_->MenuClosed(); |
| 210 isMenuOpen_ = NO; | 210 isMenuOpen_ = NO; |
| 211 } | 211 } |
| 212 | 212 |
| 213 @end | 213 @end |
| OLD | NEW |