| 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 #import "chrome/browser/cocoa/location_bar_view_mac.h" | 5 #import "chrome/browser/cocoa/location_bar_view_mac.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 const TemplateURL* template_url = | 39 const TemplateURL* template_url = |
| 40 profile->GetTemplateURLModel()->GetTemplateURLForKeyword(keyword); | 40 profile->GetTemplateURLModel()->GetTemplateURLForKeyword(keyword); |
| 41 if (template_url) | 41 if (template_url) |
| 42 return template_url->AdjustedShortNameForLocaleDirection(); | 42 return template_url->AdjustedShortNameForLocaleDirection(); |
| 43 return std::wstring(); | 43 return std::wstring(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace | 46 } // namespace |
| 47 | 47 |
| 48 LocationBarViewMac::LocationBarViewMac(AutocompleteTextField* field, | 48 LocationBarViewMac::LocationBarViewMac(AutocompleteTextField* field, |
| 49 AutocompletePopupPositioner* positioner, |
| 49 CommandUpdater* command_updater, | 50 CommandUpdater* command_updater, |
| 50 ToolbarModel* toolbar_model, | 51 ToolbarModel* toolbar_model, |
| 51 Profile* profile) | 52 Profile* profile) |
| 52 : edit_view_(new AutocompleteEditViewMac(this, toolbar_model, profile, | 53 : edit_view_(new AutocompleteEditViewMac(this, positioner, toolbar_model, |
| 53 command_updater, field)), | 54 profile, command_updater, field)), |
| 54 command_updater_(command_updater), | 55 command_updater_(command_updater), |
| 55 field_(field), | 56 field_(field), |
| 56 disposition_(CURRENT_TAB), | 57 disposition_(CURRENT_TAB), |
| 57 profile_(profile), | 58 profile_(profile), |
| 58 transition_(PageTransition::TYPED) { | 59 transition_(PageTransition::TYPED) { |
| 59 } | 60 } |
| 60 | 61 |
| 61 LocationBarViewMac::~LocationBarViewMac() { | 62 LocationBarViewMac::~LocationBarViewMac() { |
| 62 // TODO(shess): Placeholder for omnibox changes. | 63 // TODO(shess): Placeholder for omnibox changes. |
| 63 } | 64 } |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 NSImage* LocationBarViewMac::GetTabButtonImage() { | 246 NSImage* LocationBarViewMac::GetTabButtonImage() { |
| 246 if (!tab_button_image_) { | 247 if (!tab_button_image_) { |
| 247 SkBitmap* skiaBitmap = ResourceBundle::GetSharedInstance(). | 248 SkBitmap* skiaBitmap = ResourceBundle::GetSharedInstance(). |
| 248 GetBitmapNamed(IDR_LOCATION_BAR_KEYWORD_HINT_TAB); | 249 GetBitmapNamed(IDR_LOCATION_BAR_KEYWORD_HINT_TAB); |
| 249 if (skiaBitmap) { | 250 if (skiaBitmap) { |
| 250 tab_button_image_.reset([gfx::SkBitmapToNSImage(*skiaBitmap) retain]); | 251 tab_button_image_.reset([gfx::SkBitmapToNSImage(*skiaBitmap) retain]); |
| 251 } | 252 } |
| 252 } | 253 } |
| 253 return tab_button_image_; | 254 return tab_button_image_; |
| 254 } | 255 } |
| OLD | NEW |