| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/autocomplete/autocomplete_popup_view_mac.h" | 5 #include "chrome/browser/autocomplete/autocomplete_popup_view_mac.h" |
| 6 | 6 |
| 7 #include "app/gfx/text_elider.h" | 7 #include "app/gfx/text_elider.h" |
| 8 #include "base/nsimage_cache_mac.h" |
| 8 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 9 #include "base/gfx/rect.h" | 10 #include "base/gfx/rect.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 11 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
| 11 #include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" | 12 #include "chrome/browser/autocomplete/autocomplete_edit_view_mac.h" |
| 12 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" | 13 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
| 13 #include "chrome/browser/bubble_positioner.h" | 14 #include "chrome/browser/bubble_positioner.h" |
| 14 #include "chrome/browser/cocoa/event_utils.h" | 15 #include "chrome/browser/cocoa/event_utils.h" |
| 15 #include "chrome/browser/cocoa/nsimage_cache.h" | |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 // The size delta between the font used for the edit and the result | 19 // The size delta between the font used for the edit and the result |
| 20 // rows. | 20 // rows. |
| 21 const int kEditFontAdjust = -1; | 21 const int kEditFontAdjust = -1; |
| 22 | 22 |
| 23 // How much to adjust the cell sizing up from the default determined | 23 // How much to adjust the cell sizing up from the default determined |
| 24 // by the font. | 24 // by the font. |
| 25 const int kCellHeightAdjust = 7.0; | 25 const int kCellHeightAdjust = 7.0; |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 DCHECK(popup_view_); | 690 DCHECK(popup_view_); |
| 691 | 691 |
| 692 // TODO(shess): UpdatePopupAppearance() is called frequently, so it | 692 // TODO(shess): UpdatePopupAppearance() is called frequently, so it |
| 693 // should be really cheap, but in this case we could probably make | 693 // should be really cheap, but in this case we could probably make |
| 694 // things even cheaper by refactoring between the popup-placement | 694 // things even cheaper by refactoring between the popup-placement |
| 695 // code and the matrix-population code. | 695 // code and the matrix-population code. |
| 696 popup_view_->UpdatePopupAppearance(); | 696 popup_view_->UpdatePopupAppearance(); |
| 697 } | 697 } |
| 698 | 698 |
| 699 @end | 699 @end |
| OLD | NEW |