Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Side by Side Diff: chrome/browser/cocoa/reload_button.mm

Issue 2878037: [Mac]Implement ViewID support. (third approach) (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Update according to review feedback. Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/location_bar/autocomplete_text_field.mm ('k') | chrome/browser/cocoa/tab_contents_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698