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 "app/resource_bundle.h" | |
10 #include "base/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
11 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
12 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 12 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
14 #include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" | 13 #include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" |
15 #include "chrome/browser/autocomplete/autocomplete_match.h" | 14 #include "chrome/browser/autocomplete/autocomplete_match.h" |
16 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" | 15 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
17 #include "chrome/browser/instant/instant_confirm_dialog.h" | 16 #include "chrome/browser/instant/instant_confirm_dialog.h" |
18 #include "chrome/browser/instant/promo_counter.h" | 17 #include "chrome/browser/instant/promo_counter.h" |
19 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
20 #include "chrome/browser/ui/cocoa/event_utils.h" | 19 #include "chrome/browser/ui/cocoa/event_utils.h" |
21 #include "chrome/browser/ui/cocoa/image_utils.h" | 20 #include "chrome/browser/ui/cocoa/image_utils.h" |
22 #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" |
23 #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" |
24 #import "chrome/browser/ui/cocoa/location_bar/omnibox_popup_view.h" | 23 #import "chrome/browser/ui/cocoa/location_bar/omnibox_popup_view.h" |
25 #include "gfx/rect.h" | 24 #include "gfx/rect.h" |
26 #include "grit/theme_resources.h" | 25 #include "grit/theme_resources.h" |
27 #include "skia/ext/skia_utils_mac.h" | 26 #include "skia/ext/skia_utils_mac.h" |
28 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" | 27 #import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h" |
29 #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" | 28 #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" |
| 29 #include "ui/base/resource/resource_bundle.h" |
30 #include "ui/base/text/text_elider.h" | 30 #include "ui/base/text/text_elider.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. |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 bottomRightCornerRadius:kPopupRoundingRadius]; | 827 bottomRightCornerRadius:kPopupRoundingRadius]; |
828 | 828 |
829 // Draw the matrix clipped to our border. | 829 // Draw the matrix clipped to our border. |
830 [NSGraphicsContext saveGraphicsState]; | 830 [NSGraphicsContext saveGraphicsState]; |
831 [path addClip]; | 831 [path addClip]; |
832 [super drawRect:rect]; | 832 [super drawRect:rect]; |
833 [NSGraphicsContext restoreGraphicsState]; | 833 [NSGraphicsContext restoreGraphicsState]; |
834 } | 834 } |
835 | 835 |
836 @end | 836 @end |
OLD | NEW |