OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // For WinDDK ATL compatibility, these ATL headers must come first. | 5 // For WinDDK ATL compatibility, these ATL headers must come first. |
6 #include "build/build_config.h" | 6 #include "build/build_config.h" |
7 | 7 |
8 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
9 #include <atlbase.h> // NOLINT | 9 #include <atlbase.h> // NOLINT |
10 #include <atlwin.h> // NOLINT | 10 #include <atlwin.h> // NOLINT |
11 #endif | 11 #endif |
12 | 12 |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "chrome/browser/ui/views/omnibox/omnibox_result_view.h" | 14 #include "chrome/browser/ui/views/omnibox/omnibox_result_view.h" |
15 | 15 |
16 #include <limits.h> | 16 #include <limits.h> |
17 | 17 |
18 #include <algorithm> // NOLINT | 18 #include <algorithm> // NOLINT |
19 | 19 |
20 #include "base/feature_list.h" | 20 #include "base/feature_list.h" |
21 #include "base/i18n/bidi_line_iterator.h" | 21 #include "base/i18n/bidi_line_iterator.h" |
22 #include "base/metrics/field_trial_params.h" | 22 #include "base/metrics/field_trial_params.h" |
23 #include "base/strings/string_number_conversions.h" | 23 #include "base/strings/string_number_conversions.h" |
24 #include "base/strings/string_util.h" | 24 #include "base/strings/string_util.h" |
25 #include "chrome/browser/ui/layout_constants.h" | 25 #include "chrome/browser/ui/layout_constants.h" |
26 #include "chrome/browser/ui/views/location_bar/background_with_1_px_border.h" | 26 #include "chrome/browser/ui/views/location_bar/background_with_1_px_border.h" |
27 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 27 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
28 #include "chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h" | 28 #include "chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h" |
29 #include "chrome/grit/generated_resources.h" | 29 #include "chrome/grit/generated_resources.h" |
30 #include "components/grit/components_scaled_resources.h" | |
31 #include "components/omnibox/browser/omnibox_field_trial.h" | 30 #include "components/omnibox/browser/omnibox_field_trial.h" |
32 #include "components/omnibox/browser/omnibox_popup_model.h" | 31 #include "components/omnibox/browser/omnibox_popup_model.h" |
33 #include "components/omnibox/browser/vector_icons.h" | 32 #include "components/omnibox/browser/vector_icons.h" |
34 #include "third_party/skia/include/core/SkColor.h" | 33 #include "third_party/skia/include/core/SkColor.h" |
35 #include "ui/accessibility/ax_node_data.h" | 34 #include "ui/accessibility/ax_node_data.h" |
36 #include "ui/base/l10n/l10n_util.h" | 35 #include "ui/base/l10n/l10n_util.h" |
37 #include "ui/base/material_design/material_design_controller.h" | 36 #include "ui/base/material_design/material_design_controller.h" |
38 #include "ui/base/resource/resource_bundle.h" | 37 #include "ui/base/resource/resource_bundle.h" |
39 #include "ui/base/theme_provider.h" | 38 #include "ui/base/theme_provider.h" |
40 #include "ui/gfx/canvas.h" | 39 #include "ui/gfx/canvas.h" |
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 destination->AppendText(text); | 843 destination->AppendText(text); |
845 const TextStyle& text_style = GetTextStyle(text_type); | 844 const TextStyle& text_style = GetTextStyle(text_type); |
846 // TODO(dschuyler): follow up on the problem of different font sizes within | 845 // TODO(dschuyler): follow up on the problem of different font sizes within |
847 // one RenderText. Maybe with destination->SetFontList(...). | 846 // one RenderText. Maybe with destination->SetFontList(...). |
848 destination->ApplyWeight( | 847 destination->ApplyWeight( |
849 is_bold ? gfx::Font::Weight::BOLD : gfx::Font::Weight::NORMAL, range); | 848 is_bold ? gfx::Font::Weight::BOLD : gfx::Font::Weight::NORMAL, range); |
850 destination->ApplyColor( | 849 destination->ApplyColor( |
851 GetNativeTheme()->GetSystemColor(text_style.colors[GetState()]), range); | 850 GetNativeTheme()->GetSystemColor(text_style.colors[GetState()]), range); |
852 destination->ApplyBaselineStyle(text_style.baseline, range); | 851 destination->ApplyBaselineStyle(text_style.baseline, range); |
853 } | 852 } |
OLD | NEW |