| 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/hover_close_button.h" | 5 #import "chrome/browser/ui/cocoa/hover_close_button.h" |
| 6 | 6 |
| 7 #include "grit/generated_resources.h" | 7 #include "grit/generated_resources.h" |
| 8 #include "grit/theme_resources.h" | 8 #include "grit/theme_resources.h" |
| 9 #include "grit/ui_resources.h" | 9 #include "grit/ui_resources.h" |
| 10 #import "third_party/GTM/AppKit/GTMKeyValueAnimation.h" | 10 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMKeyValueAnimation.h" |
| 11 #include "ui/base/cocoa/animation_utils.h" | 11 #include "ui/base/cocoa/animation_utils.h" |
| 12 #include "ui/base/l10n/l10n_util.h" | 12 #include "ui/base/l10n/l10n_util.h" |
| 13 #include "ui/base/resource/resource_bundle.h" | 13 #include "ui/base/resource/resource_bundle.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 const CGFloat kFramesPerSecond = 16; // Determined experimentally to look good. | 16 const CGFloat kFramesPerSecond = 16; // Determined experimentally to look good. |
| 17 const CGFloat kCloseAnimationDuration = 0.1; | 17 const CGFloat kCloseAnimationDuration = 0.1; |
| 18 | 18 |
| 19 // Strings that are used for all close buttons. Set up in +initialize. | 19 // Strings that are used for all close buttons. Set up in +initialize. |
| 20 NSString* gTooltip = nil; | 20 NSString* gTooltip = nil; |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 break; | 228 break; |
| 229 case kHoverStateMouseDown: | 229 case kHoverStateMouseDown: |
| 230 imageID = IDR_CLOSE_DIALOG_P; | 230 imageID = IDR_CLOSE_DIALOG_P; |
| 231 break; | 231 break; |
| 232 } | 232 } |
| 233 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 233 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
| 234 return bundle.GetNativeImageNamed(imageID).ToNSImage(); | 234 return bundle.GetNativeImageNamed(imageID).ToNSImage(); |
| 235 } | 235 } |
| 236 | 236 |
| 237 @end | 237 @end |
| OLD | NEW |