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/bookmarks/bookmark_bar_folder_controller.h" | 5 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h" |
6 | 6 |
7 #include "base/mac/bundle_locations.h" | 7 #include "base/mac/bundle_locations.h" |
8 #include "base/mac/mac_util.h" | 8 #include "base/mac/mac_util.h" |
9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 - (void)addOrUpdateScrollTracking { | 1052 - (void)addOrUpdateScrollTracking { |
1053 [self removeScrollTracking]; | 1053 [self removeScrollTracking]; |
1054 NSView* view = [[self window] contentView]; | 1054 NSView* view = [[self window] contentView]; |
1055 scrollTrackingArea_.reset([[CrTrackingArea alloc] | 1055 scrollTrackingArea_.reset([[CrTrackingArea alloc] |
1056 initWithRect:[view bounds] | 1056 initWithRect:[view bounds] |
1057 options:(NSTrackingMouseMoved | | 1057 options:(NSTrackingMouseMoved | |
1058 NSTrackingMouseEnteredAndExited | | 1058 NSTrackingMouseEnteredAndExited | |
1059 NSTrackingActiveAlways | | 1059 NSTrackingActiveAlways | |
1060 NSTrackingEnabledDuringMouseDrag | 1060 NSTrackingEnabledDuringMouseDrag |
1061 ) | 1061 ) |
1062 proxiedOwner:self | 1062 owner:self |
1063 userInfo:nil]); | 1063 userInfo:nil]); |
1064 [view addTrackingArea:scrollTrackingArea_.get()]; | 1064 [view addTrackingArea:scrollTrackingArea_.get()]; |
1065 } | 1065 } |
1066 | 1066 |
1067 // Remove the tracking area associated with scrolling. | 1067 // Remove the tracking area associated with scrolling. |
1068 - (void)removeScrollTracking { | 1068 - (void)removeScrollTracking { |
1069 if (scrollTrackingArea_.get()) { | 1069 if (scrollTrackingArea_.get()) { |
1070 [[[self window] contentView] removeTrackingArea:scrollTrackingArea_.get()]; | 1070 [[[self window] contentView] removeTrackingArea:scrollTrackingArea_.get()]; |
1071 [scrollTrackingArea_.get() clearOwner]; | 1071 [scrollTrackingArea_.get() clearOwner]; |
1072 } | 1072 } |
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2004 | 2004 |
2005 - (void)setIgnoreAnimations:(BOOL)ignore { | 2005 - (void)setIgnoreAnimations:(BOOL)ignore { |
2006 ignoreAnimations_ = ignore; | 2006 ignoreAnimations_ = ignore; |
2007 } | 2007 } |
2008 | 2008 |
2009 - (BookmarkButton*)buttonThatMouseIsIn { | 2009 - (BookmarkButton*)buttonThatMouseIsIn { |
2010 return buttonThatMouseIsIn_; | 2010 return buttonThatMouseIsIn_; |
2011 } | 2011 } |
2012 | 2012 |
2013 @end // BookmarkBarFolderController | 2013 @end // BookmarkBarFolderController |
OLD | NEW |