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/autocomplete/autocomplete_popup_contents_view.
h" | 5 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.
h" |
6 | 6 |
7 #include "app/bidi_line_iterator.h" | 7 #include "app/bidi_line_iterator.h" |
8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
10 #include "app/text_elider.h" | 10 #include "app/text_elider.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 #include "views/painter.h" | 35 #include "views/painter.h" |
36 #include "views/standard_layout.h" | 36 #include "views/standard_layout.h" |
37 #include "views/widget/widget.h" | 37 #include "views/widget/widget.h" |
38 #include "views/window/window.h" | 38 #include "views/window/window.h" |
39 | 39 |
40 #if defined(OS_WIN) | 40 #if defined(OS_WIN) |
41 #include <commctrl.h> | 41 #include <commctrl.h> |
42 #include <dwmapi.h> | 42 #include <dwmapi.h> |
43 #include <objidl.h> | 43 #include <objidl.h> |
44 | 44 |
45 #include "app/win/hwnd_util.h" | |
46 #include "base/win/scoped_gdi_object.h" | 45 #include "base/win/scoped_gdi_object.h" |
| 46 #include "ui/base/win/hwnd_util.h" |
47 #endif | 47 #endif |
48 | 48 |
49 #if defined(OS_LINUX) | 49 #if defined(OS_LINUX) |
50 #include "chrome/browser/ui/gtk/gtk_util.h" | 50 #include "chrome/browser/ui/gtk/gtk_util.h" |
51 #include "gfx/skia_utils_gtk.h" | 51 #include "gfx/skia_utils_gtk.h" |
52 #endif | 52 #endif |
53 | 53 |
54 namespace { | 54 namespace { |
55 | 55 |
56 enum ResultViewState { | 56 enum ResultViewState { |
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 SkIntToScalar(bounding_rect.right()), | 1100 SkIntToScalar(bounding_rect.right()), |
1101 SkIntToScalar(bounding_rect.bottom())); | 1101 SkIntToScalar(bounding_rect.bottom())); |
1102 | 1102 |
1103 SkScalar radius = SkIntToScalar(BubbleBorder::GetCornerRadius()); | 1103 SkScalar radius = SkIntToScalar(BubbleBorder::GetCornerRadius()); |
1104 path->addRoundRect(rect, radius, radius); | 1104 path->addRoundRect(rect, radius, radius); |
1105 } | 1105 } |
1106 | 1106 |
1107 void AutocompletePopupContentsView::UpdateBlurRegion() { | 1107 void AutocompletePopupContentsView::UpdateBlurRegion() { |
1108 #if defined(OS_WIN) | 1108 #if defined(OS_WIN) |
1109 // We only support background blurring on Vista with Aero-Glass enabled. | 1109 // We only support background blurring on Vista with Aero-Glass enabled. |
1110 if (!app::win::ShouldUseVistaFrame() || !GetWidget()) | 1110 if (!ui::ShouldUseVistaFrame() || !GetWidget()) |
1111 return; | 1111 return; |
1112 | 1112 |
1113 // Provide a blurred background effect within the contents region of the | 1113 // Provide a blurred background effect within the contents region of the |
1114 // popup. | 1114 // popup. |
1115 DWM_BLURBEHIND bb = {0}; | 1115 DWM_BLURBEHIND bb = {0}; |
1116 bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION; | 1116 bb.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION; |
1117 bb.fEnable = true; | 1117 bb.fEnable = true; |
1118 | 1118 |
1119 // Translate the contents rect into widget coordinates, since that's what | 1119 // Translate the contents rect into widget coordinates, since that's what |
1120 // DwmEnableBlurBehindWindow expects a region in. | 1120 // DwmEnableBlurBehindWindow expects a region in. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 opt_in_view_ = NULL; | 1204 opt_in_view_ = NULL; |
1205 PromoCounter* counter = model_->profile()->GetInstantPromoCounter(); | 1205 PromoCounter* counter = model_->profile()->GetInstantPromoCounter(); |
1206 DCHECK(counter); | 1206 DCHECK(counter); |
1207 counter->Hide(); | 1207 counter->Hide(); |
1208 if (opt_in) { | 1208 if (opt_in) { |
1209 browser::ShowInstantConfirmDialogIfNecessary( | 1209 browser::ShowInstantConfirmDialogIfNecessary( |
1210 location_bar_->GetWindow()->GetNativeWindow(), model_->profile()); | 1210 location_bar_->GetWindow()->GetNativeWindow(), model_->profile()); |
1211 } | 1211 } |
1212 UpdatePopupAppearance(); | 1212 UpdatePopupAppearance(); |
1213 } | 1213 } |
OLD | NEW |