| 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 #include <cmath> | 5 #include <cmath> |
| 6 | 6 |
| 7 #include "chrome/browser/autocomplete/autocomplete_popup_view_mac.h" | 7 #include "chrome/browser/autocomplete/autocomplete_popup_view_mac.h" |
| 8 | 8 |
| 9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 12 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
| 13 #include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" | 13 #include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" |
| 14 #include "chrome/browser/autocomplete/autocomplete_match.h" | 14 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| 15 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" | 15 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
| 16 #include "chrome/browser/instant/instant_confirm_dialog.h" | 16 #include "chrome/browser/instant/instant_confirm_dialog.h" |
| 17 #include "chrome/browser/instant/promo_counter.h" | 17 #include "chrome/browser/instant/promo_counter.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/ui/cocoa/event_utils.h" | 19 #include "chrome/browser/ui/cocoa/event_utils.h" |
| 20 #include "chrome/browser/ui/cocoa/image_utils.h" | 20 #include "chrome/browser/ui/cocoa/image_utils.h" |
| 21 #import "chrome/browser/ui/cocoa/location_bar/instant_opt_in_controller.h" | 21 #import "chrome/browser/ui/cocoa/location_bar/instant_opt_in_controller.h" |
| 22 #import "chrome/browser/ui/cocoa/location_bar/instant_opt_in_view.h" | 22 #import "chrome/browser/ui/cocoa/location_bar/instant_opt_in_view.h" |
| 23 #import "chrome/browser/ui/cocoa/location_bar/omnibox_popup_view.h" | 23 #import "chrome/browser/ui/cocoa/location_bar/omnibox_popup_view.h" |
| 24 #include "gfx/rect.h" | |
| 25 #include "grit/theme_resources.h" | 24 #include "grit/theme_resources.h" |
| 26 #include "skia/ext/skia_utils_mac.h" | 25 #include "skia/ext/skia_utils_mac.h" |
| 27 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 26 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
| 28 #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" | 27 #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" |
| 29 #include "ui/base/resource/resource_bundle.h" | 28 #include "ui/base/resource/resource_bundle.h" |
| 30 #include "ui/base/text/text_elider.h" | 29 #include "ui/base/text/text_elider.h" |
| 30 #include "ui/gfx/rect.h" |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 // The size delta between the font used for the edit and the result | 34 // The size delta between the font used for the edit and the result |
| 35 // rows. | 35 // rows. |
| 36 const int kEditFontAdjust = -1; | 36 const int kEditFontAdjust = -1; |
| 37 | 37 |
| 38 // How much to adjust the cell sizing up from the default determined | 38 // How much to adjust the cell sizing up from the default determined |
| 39 // by the font. | 39 // by the font. |
| 40 const int kCellHeightAdjust = 6.0; | 40 const int kCellHeightAdjust = 6.0; |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 bottomRightCornerRadius:kPopupRoundingRadius]; | 826 bottomRightCornerRadius:kPopupRoundingRadius]; |
| 827 | 827 |
| 828 // Draw the matrix clipped to our border. | 828 // Draw the matrix clipped to our border. |
| 829 [NSGraphicsContext saveGraphicsState]; | 829 [NSGraphicsContext saveGraphicsState]; |
| 830 [path addClip]; | 830 [path addClip]; |
| 831 [super drawRect:rect]; | 831 [super drawRect:rect]; |
| 832 [NSGraphicsContext restoreGraphicsState]; | 832 [NSGraphicsContext restoreGraphicsState]; |
| 833 } | 833 } |
| 834 | 834 |
| 835 @end | 835 @end |
| OLD | NEW |