| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cocoa/extensions/browser_actions_container_view.h" | 5 #import "chrome/browser/cocoa/extensions/browser_actions_container_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #import "base/scoped_nsobject.h" | 10 #import "base/scoped_nsobject.h" |
| 11 #import "chrome/browser/cocoa/view_id_util.h" |
| 11 | 12 |
| 12 NSString* const kBrowserActionGrippyDragStartedNotification = | 13 NSString* const kBrowserActionGrippyDragStartedNotification = |
| 13 @"BrowserActionGrippyDragStartedNotification"; | 14 @"BrowserActionGrippyDragStartedNotification"; |
| 14 NSString* const kBrowserActionGrippyDraggingNotification = | 15 NSString* const kBrowserActionGrippyDraggingNotification = |
| 15 @"BrowserActionGrippyDraggingNotification"; | 16 @"BrowserActionGrippyDraggingNotification"; |
| 16 NSString* const kBrowserActionGrippyDragFinishedNotification = | 17 NSString* const kBrowserActionGrippyDragFinishedNotification = |
| 17 @"BrowserActionGrippyDragFinishedNotification"; | 18 @"BrowserActionGrippyDragFinishedNotification"; |
| 18 | 19 |
| 19 namespace { | 20 namespace { |
| 20 const CGFloat kAnimationDuration = 0.2; | 21 const CGFloat kAnimationDuration = 0.2; |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 } else if (!canDragLeft_) { | 198 } else if (!canDragLeft_) { |
| 198 retVal = [NSCursor resizeRightCursor]; | 199 retVal = [NSCursor resizeRightCursor]; |
| 199 } else if (!canDragRight_) { | 200 } else if (!canDragRight_) { |
| 200 retVal = [NSCursor resizeLeftCursor]; | 201 retVal = [NSCursor resizeLeftCursor]; |
| 201 } else { | 202 } else { |
| 202 retVal = [NSCursor resizeLeftRightCursor]; | 203 retVal = [NSCursor resizeLeftRightCursor]; |
| 203 } | 204 } |
| 204 return retVal; | 205 return retVal; |
| 205 } | 206 } |
| 206 | 207 |
| 208 // Tag is used solely for ViewID. Override to prevent changing of it. |
| 209 - (NSInteger)tag { |
| 210 return view_id_util::ViewIDToTag(VIEW_ID_BROWSER_ACTION_TOOLBAR); |
| 211 } |
| 212 |
| 207 @end | 213 @end |
| OLD | NEW |