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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/image_decoration.mm

Issue 2521033002: [Mac] Fix for omnibox lock icon (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/image_decoration_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <cmath> 5 #include <cmath>
6 6
7 #import "chrome/browser/ui/cocoa/location_bar/image_decoration.h" 7 #import "chrome/browser/ui/cocoa/location_bar/image_decoration.h"
8 8
9 // The amount of horizontal padding around the image. 9 // The amount of horizontal padding around the image.
10 const CGFloat kImageHorizontalPadding = 9.0; 10 const CGFloat kImageHorizontalPadding = 10.0;
11 11
12 ImageDecoration::ImageDecoration() { 12 ImageDecoration::ImageDecoration() {
13 } 13 }
14 14
15 ImageDecoration::~ImageDecoration() { 15 ImageDecoration::~ImageDecoration() {
16 } 16 }
17 17
18 NSImage* ImageDecoration::GetImage() { 18 NSImage* ImageDecoration::GetImage() {
19 return image_; 19 return image_;
20 } 20 }
(...skipping 26 matching lines...) Expand all
47 } 47 }
48 48
49 void ImageDecoration::DrawInFrame(NSRect frame, NSView* control_view) { 49 void ImageDecoration::DrawInFrame(NSRect frame, NSView* control_view) {
50 [GetImage() drawInRect:GetDrawRectInFrame(frame) 50 [GetImage() drawInRect:GetDrawRectInFrame(frame)
51 fromRect:NSZeroRect // Entire image 51 fromRect:NSZeroRect // Entire image
52 operation:NSCompositeSourceOver 52 operation:NSCompositeSourceOver
53 fraction:1.0 53 fraction:1.0
54 respectFlipped:YES 54 respectFlipped:YES
55 hints:nil]; 55 hints:nil];
56 } 56 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/image_decoration_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698