| 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/reload_button.h" | 5 #import "chrome/browser/cocoa/reload_button.h" |
| 6 | 6 |
| 7 #include "base/nsimage_cache_mac.h" | 7 #include "base/nsimage_cache_mac.h" |
| 8 #include "chrome/app/chrome_dll_resource.h" | 8 #include "chrome/app/chrome_dll_resource.h" |
| 9 #import "chrome/browser/cocoa/view_id_util.h" |
| 9 | 10 |
| 10 namespace { | 11 namespace { |
| 11 | 12 |
| 12 NSString* const kReloadImageName = @"reload_Template.pdf"; | 13 NSString* const kReloadImageName = @"reload_Template.pdf"; |
| 13 NSString* const kStopImageName = @"stop_Template.pdf"; | 14 NSString* const kStopImageName = @"stop_Template.pdf"; |
| 14 | 15 |
| 15 } // namespace | 16 } // namespace |
| 16 | 17 |
| 17 @implementation ReloadButton | 18 @implementation ReloadButton |
| 18 | 19 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 99 |
| 99 // Reload mode was requested during the hover. | 100 // Reload mode was requested during the hover. |
| 100 if (pendingReloadMode_) | 101 if (pendingReloadMode_) |
| 101 [self setIsLoading:NO force:YES]; | 102 [self setIsLoading:NO force:YES]; |
| 102 } | 103 } |
| 103 | 104 |
| 104 - (BOOL)isMouseInside { | 105 - (BOOL)isMouseInside { |
| 105 return trackingArea_ && isMouseInside_; | 106 return trackingArea_ && isMouseInside_; |
| 106 } | 107 } |
| 107 | 108 |
| 109 - (ViewID)viewID { |
| 110 return VIEW_ID_RELOAD_BUTTON; |
| 111 } |
| 112 |
| 108 @end // ReloadButton | 113 @end // ReloadButton |
| 109 | 114 |
| 110 @implementation ReloadButton (Testing) | 115 @implementation ReloadButton (Testing) |
| 111 | 116 |
| 112 - (NSTrackingArea*)trackingArea { | 117 - (NSTrackingArea*)trackingArea { |
| 113 return trackingArea_; | 118 return trackingArea_; |
| 114 } | 119 } |
| 115 | 120 |
| 116 @end | 121 @end |
| OLD | NEW |