| 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 #include "chrome/browser/ui/views/default_search_view.h" | 5 #include "chrome/browser/ui/views/default_search_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/search_engines/template_url.h" | 11 #include "chrome/browser/search_engines/template_url.h" |
| 12 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 12 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
| 13 #include "chrome/browser/search_engines/template_url_service.h" | 13 #include "chrome/browser/search_engines/template_url_service.h" |
| 14 #include "chrome/browser/search_engines/template_url_service_factory.h" | 14 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 15 #include "chrome/browser/themes/theme_service.h" | 15 #include "chrome/browser/themes/theme_service.h" |
| 16 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 16 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 17 #include "chrome/browser/ui/views/constrained_window_views.h" | 17 #include "chrome/browser/ui/views/constrained_window_views.h" |
| 18 #include "content/browser/tab_contents/tab_contents.h" | 18 #include "content/browser/tab_contents/tab_contents.h" |
| 19 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
| 20 #include "grit/locale_settings.h" | 20 #include "grit/locale_settings.h" |
| 21 #include "grit/theme_resources.h" | 21 #include "grit/theme_resources.h" |
| 22 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
| 23 #include "ui/base/resource/resource_bundle.h" | 23 #include "ui/base/resource/resource_bundle.h" |
| 24 #include "ui/gfx/canvas.h" | 24 #include "ui/gfx/canvas.h" |
| 25 #include "ui/views/layout/grid_layout.h" | 25 #include "ui/views/layout/grid_layout.h" |
| 26 #include "ui/views/layout/layout_constants.h" | 26 #include "ui/views/layout/layout_constants.h" |
| 27 #include "ui/views/widget/widget.h" | |
| 28 #include "ui/views/window/dialog_client_view.h" | 27 #include "ui/views/window/dialog_client_view.h" |
| 29 #include "views/controls/button/text_button.h" | 28 #include "views/controls/button/text_button.h" |
| 30 #include "views/controls/image_view.h" | 29 #include "views/controls/image_view.h" |
| 31 #include "views/controls/label.h" | 30 #include "views/controls/label.h" |
| 31 #include "views/widget/widget.h" |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 // Returns a short name and logo resource id for the given host. | 35 // Returns a short name and logo resource id for the given host. |
| 36 void GetShortNameAndLogoId(PrefService* prefs, | 36 void GetShortNameAndLogoId(PrefService* prefs, |
| 37 const TemplateURL* turl, | 37 const TemplateURL* turl, |
| 38 std::wstring* short_name, | 38 std::wstring* short_name, |
| 39 int* logo_id) { | 39 int* logo_id) { |
| 40 DCHECK(prefs); | 40 DCHECK(prefs); |
| 41 DCHECK(turl); | 41 DCHECK(turl); |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 this, | 304 this, |
| 305 IDS_DEFAULT_SEARCH_PROMPT_CURRENT, | 305 IDS_DEFAULT_SEARCH_PROMPT_CURRENT, |
| 306 default_short_name); | 306 default_short_name); |
| 307 layout->AddView(default_provider_button_); | 307 layout->AddView(default_provider_button_); |
| 308 proposed_provider_button_ = CreateProviderChoiceButton( | 308 proposed_provider_button_ = CreateProviderChoiceButton( |
| 309 this, | 309 this, |
| 310 IDS_DEFAULT_SEARCH_PROMPT_PROPOSED, | 310 IDS_DEFAULT_SEARCH_PROMPT_PROPOSED, |
| 311 proposed_short_name); | 311 proposed_short_name); |
| 312 layout->AddView(proposed_provider_button_); | 312 layout->AddView(proposed_provider_button_); |
| 313 } | 313 } |
| OLD | NEW |