| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/cocoa/omnibox/omnibox_popup_view_mac.h" | 5 #import "chrome/browser/ui/cocoa/omnibox/omnibox_popup_view_mac.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/sys_string_conversions.h" | 8 #include "base/sys_string_conversions.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete.h" | 10 #include "chrome/browser/autocomplete/autocomplete.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 if (runFont && (mask == ([fontManager traitsOfFont:runFont]&mask))) { | 81 if (runFont && (mask == ([fontManager traitsOfFont:runFont]&mask))) { |
| 82 return true; | 82 return true; |
| 83 } | 83 } |
| 84 return false; | 84 return false; |
| 85 } | 85 } |
| 86 | 86 |
| 87 // AutocompleteMatch doesn't really have the right constructor for our | 87 // AutocompleteMatch doesn't really have the right constructor for our |
| 88 // needs. Fake one for us to use. | 88 // needs. Fake one for us to use. |
| 89 static AutocompleteMatch MakeMatch(const string16 &contents, | 89 static AutocompleteMatch MakeMatch(const string16 &contents, |
| 90 const string16 &description) { | 90 const string16 &description) { |
| 91 AutocompleteMatch m(NULL, 1, true, AutocompleteMatch::URL_WHAT_YOU_TYPED); | 91 AutocompleteMatch m(NULL, 1, 0.0f, true, |
| 92 AutocompleteMatch::URL_WHAT_YOU_TYPED); |
| 92 m.contents = contents; | 93 m.contents = contents; |
| 93 m.description = description; | 94 m.description = description; |
| 94 return m; | 95 return m; |
| 95 } | 96 } |
| 96 | 97 |
| 97 NSColor* color_; // weak | 98 NSColor* color_; // weak |
| 98 NSColor* dimColor_; // weak | 99 NSColor* dimColor_; // weak |
| 99 gfx::Font font_; | 100 gfx::Font font_; |
| 100 }; | 101 }; |
| 101 | 102 |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 // updates the model's selection from the matrix before returning. | 544 // updates the model's selection from the matrix before returning. |
| 544 // Could possibly test that via -select:. | 545 // Could possibly test that via -select:. |
| 545 | 546 |
| 546 // TODO(shess): Test that AutocompleteButtonCell returns the right | 547 // TODO(shess): Test that AutocompleteButtonCell returns the right |
| 547 // background colors for on, highlighted, and neither. | 548 // background colors for on, highlighted, and neither. |
| 548 | 549 |
| 549 // TODO(shess): Test that AutocompleteMatrixTarget can be initialized | 550 // TODO(shess): Test that AutocompleteMatrixTarget can be initialized |
| 550 // and then sends -select: to the view. | 551 // and then sends -select: to the view. |
| 551 | 552 |
| 552 } // namespace | 553 } // namespace |
| OLD | NEW |