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

Side by Side Diff: chrome/browser/ui/cocoa/image_button_cell.mm

Issue 595283002: Move nsview_additions and hyperlink_text_view to ui/base/cocoa (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/image_button_cell.h" 5 #import "chrome/browser/ui/cocoa/image_button_cell.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "chrome/browser/themes/theme_service.h" 8 #import "chrome/browser/themes/theme_service.h"
9 #import "chrome/browser/ui/cocoa/nsview_additions.h"
10 #import "chrome/browser/ui/cocoa/rect_path_utils.h" 9 #import "chrome/browser/ui/cocoa/rect_path_utils.h"
11 #import "chrome/browser/ui/cocoa/themed_window.h" 10 #import "chrome/browser/ui/cocoa/themed_window.h"
11 #import "ui/base/cocoa/nsview_additions.h"
12 #include "ui/gfx/image/image.h" 12 #include "ui/gfx/image/image.h"
13 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" 13 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
14 14
15 // When the window doesn't have focus then we want to draw the button with a 15 // When the window doesn't have focus then we want to draw the button with a
16 // slightly lighter color. We do this by just reducing the alpha. 16 // slightly lighter color. We do this by just reducing the alpha.
17 const CGFloat kImageNoFocusAlpha = 0.65; 17 const CGFloat kImageNoFocusAlpha = 0.65;
18 18
19 @interface ImageButtonCell (Private) 19 @interface ImageButtonCell (Private)
20 - (void)sharedInit; 20 - (void)sharedInit;
21 - (image_button_cell::ButtonState)currentButtonState; 21 - (image_button_cell::ButtonState)currentButtonState;
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 - (void)mouseEntered:(NSEvent*)theEvent { 198 - (void)mouseEntered:(NSEvent*)theEvent {
199 [self setIsMouseInside:YES]; 199 [self setIsMouseInside:YES];
200 } 200 }
201 201
202 - (void)mouseExited:(NSEvent*)theEvent { 202 - (void)mouseExited:(NSEvent*)theEvent {
203 [self setIsMouseInside:NO]; 203 [self setIsMouseInside:NO];
204 } 204 }
205 205
206 @end 206 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698