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

Side by Side Diff: chrome/browser/cocoa/location_bar/ev_bubble_decoration.mm

Issue 3089004: Mac: Some clang appeasing. (Closed)
Patch Set: '' Created 10 years, 4 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/location_bar/ev_bubble_decoration.h" 5 #import "chrome/browser/cocoa/location_bar/ev_bubble_decoration.h"
6 6
7 #include "app/text_elider.h" 7 #include "app/text_elider.h"
8 #import "base/logging.h" 8 #import "base/logging.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #import "chrome/browser/cocoa/image_utils.h" 10 #import "chrome/browser/cocoa/image_utils.h"
(...skipping 13 matching lines...) Expand all
24 // Minimum acceptable width for the ev bubble. 24 // Minimum acceptable width for the ev bubble.
25 const CGFloat kMinElidedBubbleWidth = 150.0; 25 const CGFloat kMinElidedBubbleWidth = 150.0;
26 26
27 // Maximum amount of available space to make the bubble, subject to 27 // Maximum amount of available space to make the bubble, subject to
28 // |kMinElidedBubbleWidth|. 28 // |kMinElidedBubbleWidth|.
29 const float kMaxBubbleFraction = 0.5; 29 const float kMaxBubbleFraction = 0.5;
30 30
31 // TODO(shess): This is ugly, find a better way. Using it right now 31 // TODO(shess): This is ugly, find a better way. Using it right now
32 // so that I can crib from gtk and still be able to see that I'm using 32 // so that I can crib from gtk and still be able to see that I'm using
33 // the same values easily. 33 // the same values easily.
34 const NSColor* ColorWithRGBBytes(int rr, int gg, int bb) { 34 NSColor* ColorWithRGBBytes(int rr, int gg, int bb) {
35 DCHECK_LE(rr, 255); 35 DCHECK_LE(rr, 255);
36 DCHECK_LE(bb, 255); 36 DCHECK_LE(bb, 255);
37 DCHECK_LE(gg, 255); 37 DCHECK_LE(gg, 255);
38 return [NSColor colorWithCalibratedRed:static_cast<float>(rr)/255.0 38 return [NSColor colorWithCalibratedRed:static_cast<float>(rr)/255.0
39 green:static_cast<float>(gg)/255.0 39 green:static_cast<float>(gg)/255.0
40 blue:static_cast<float>(bb)/255.0 40 blue:static_cast<float>(bb)/255.0
41 alpha:1.0]; 41 alpha:1.0];
42 } 42 }
43 43
44 } // namespace 44 } // namespace
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 return location_icon_->GetDragPasteboard(); 98 return location_icon_->GetDragPasteboard();
99 } 99 }
100 100
101 NSImage* EVBubbleDecoration::GetDragImage() { 101 NSImage* EVBubbleDecoration::GetDragImage() {
102 return location_icon_->GetDragImage(); 102 return location_icon_->GetDragImage();
103 } 103 }
104 104
105 bool EVBubbleDecoration::OnMousePressed(NSRect frame) { 105 bool EVBubbleDecoration::OnMousePressed(NSRect frame) {
106 return location_icon_->OnMousePressed(frame); 106 return location_icon_->OnMousePressed(frame);
107 } 107 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/fullscreen_controller.mm ('k') | chrome/browser/cocoa/popup_blocked_animation_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698