| 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/app_menu/app_menu_controller.h" | 5 #import "chrome/browser/ui/cocoa/app_menu/app_menu_controller.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include <stddef.h> |
| 8 |
| 8 #include "base/bind.h" | 9 #include "base/bind.h" |
| 9 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
| 11 #include "base/macros.h" |
| 10 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 11 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
| 12 #include "base/scoped_observer.h" | 14 #include "base/scoped_observer.h" |
| 13 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 14 #include "base/strings/sys_string_conversions.h" | 16 #include "base/strings/sys_string_conversions.h" |
| 15 #include "chrome/app/chrome_command_ids.h" | 17 #include "chrome/app/chrome_command_ids.h" |
| 16 #import "chrome/browser/app_controller_mac.h" | 18 #import "chrome/browser/app_controller_mac.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 19 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/ui/browser.h" | 20 #include "chrome/browser/ui/browser.h" |
| 19 #include "chrome/browser/ui/browser_window.h" | 21 #include "chrome/browser/ui/browser_window.h" |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 // (and thus, after all our ability to adjust it normally). Throw in the | 620 // (and thus, after all our ability to adjust it normally). Throw in the |
| 619 // towel, and simply don't let the frame move from where it's supposed to be. | 621 // towel, and simply don't let the frame move from where it's supposed to be. |
| 620 // TODO(devlin): Yet another Cocoa hack. It'd be good to find a workaround, | 622 // TODO(devlin): Yet another Cocoa hack. It'd be good to find a workaround, |
| 621 // but unlikely unless we replace the Cocoa menu implementation. | 623 // but unlikely unless we replace the Cocoa menu implementation. |
| 622 NSView* containerSuperview = [overflowActionsContainerView_ superview]; | 624 NSView* containerSuperview = [overflowActionsContainerView_ superview]; |
| 623 if (NSMinX([containerSuperview frame]) != 0) | 625 if (NSMinX([containerSuperview frame]) != 0) |
| 624 [containerSuperview setFrameOrigin:NSZeroPoint]; | 626 [containerSuperview setFrameOrigin:NSZeroPoint]; |
| 625 } | 627 } |
| 626 | 628 |
| 627 @end // @implementation AppMenuButtonViewController | 629 @end // @implementation AppMenuButtonViewController |
| OLD | NEW |