| 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 #include "chrome/browser/autocomplete/autocomplete_edit_view_win.h" | 5 #include "chrome/browser/autocomplete/autocomplete_edit_view_win.h" |
| 6 | 6 |
| 7 #include <locale> | 7 #include <locale> |
| 8 | 8 |
| 9 #include "app/gfx/chrome_canvas.h" | 9 #include "app/gfx/chrome_canvas.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| 11 #include "app/l10n_util_win.h" | 11 #include "app/l10n_util_win.h" |
| 12 #include "app/os_exchange_data.h" | 12 #include "app/os_exchange_data.h" |
| 13 #include "app/win_util.h" |
| 13 #include "base/base_drag_source.h" | 14 #include "base/base_drag_source.h" |
| 14 #include "base/base_drop_target.h" | 15 #include "base/base_drop_target.h" |
| 15 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
| 16 #include "base/clipboard.h" | 17 #include "base/clipboard.h" |
| 17 #include "base/iat_patch.h" | 18 #include "base/iat_patch.h" |
| 18 #include "base/lazy_instance.h" | 19 #include "base/lazy_instance.h" |
| 19 #include "base/ref_counted.h" | 20 #include "base/ref_counted.h" |
| 20 #include "base/scoped_clipboard_writer.h" | 21 #include "base/scoped_clipboard_writer.h" |
| 21 #include "base/string_util.h" | 22 #include "base/string_util.h" |
| 22 #include "chrome/app/chrome_dll_resource.h" | 23 #include "chrome/app/chrome_dll_resource.h" |
| 23 #include "chrome/browser/autocomplete/autocomplete_accessibility.h" | 24 #include "chrome/browser/autocomplete/autocomplete_accessibility.h" |
| 24 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" | 25 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
| 25 #include "chrome/browser/autocomplete/autocomplete_popup_view_win.h" | 26 #include "chrome/browser/autocomplete/autocomplete_popup_view_win.h" |
| 26 #include "chrome/browser/autocomplete/keyword_provider.h" | 27 #include "chrome/browser/autocomplete/keyword_provider.h" |
| 27 #include "chrome/browser/browser_process.h" | 28 #include "chrome/browser/browser_process.h" |
| 28 #include "chrome/browser/command_updater.h" | 29 #include "chrome/browser/command_updater.h" |
| 29 #include "chrome/browser/metrics/user_metrics.h" | 30 #include "chrome/browser/metrics/user_metrics.h" |
| 30 #include "chrome/browser/net/url_fixer_upper.h" | 31 #include "chrome/browser/net/url_fixer_upper.h" |
| 31 #include "chrome/browser/profile.h" | 32 #include "chrome/browser/profile.h" |
| 32 #include "chrome/browser/search_engines/template_url.h" | 33 #include "chrome/browser/search_engines/template_url.h" |
| 33 #include "chrome/browser/search_engines/template_url_model.h" | 34 #include "chrome/browser/search_engines/template_url_model.h" |
| 34 #include "chrome/browser/tab_contents/tab_contents.h" | 35 #include "chrome/browser/tab_contents/tab_contents.h" |
| 35 #include "chrome/browser/views/location_bar_view.h" | 36 #include "chrome/browser/views/location_bar_view.h" |
| 36 #include "chrome/common/gfx/utils.h" | 37 #include "chrome/common/gfx/utils.h" |
| 37 #include "chrome/common/notification_service.h" | 38 #include "chrome/common/notification_service.h" |
| 38 #include "chrome/common/win_util.h" | |
| 39 #include "googleurl/src/url_util.h" | 39 #include "googleurl/src/url_util.h" |
| 40 #include "grit/generated_resources.h" | 40 #include "grit/generated_resources.h" |
| 41 #include "skia/ext/skia_utils_win.h" | 41 #include "skia/ext/skia_utils_win.h" |
| 42 #include "views/drag_utils.h" | 42 #include "views/drag_utils.h" |
| 43 #include "views/focus/focus_util_win.h" | 43 #include "views/focus/focus_util_win.h" |
| 44 | 44 |
| 45 #pragma comment(lib, "oleacc.lib") // Needed for accessibility support. | 45 #pragma comment(lib, "oleacc.lib") // Needed for accessibility support. |
| 46 | 46 |
| 47 /////////////////////////////////////////////////////////////////////////////// | 47 /////////////////////////////////////////////////////////////////////////////// |
| 48 // AutocompleteEditModel | 48 // AutocompleteEditModel |
| (...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2253 } | 2253 } |
| 2254 | 2254 |
| 2255 void AutocompleteEditViewWin::RepaintDropHighlight(int position) { | 2255 void AutocompleteEditViewWin::RepaintDropHighlight(int position) { |
| 2256 if ((position != -1) && (position <= GetTextLength())) { | 2256 if ((position != -1) && (position <= GetTextLength())) { |
| 2257 const POINT min_loc(PosFromChar(position)); | 2257 const POINT min_loc(PosFromChar(position)); |
| 2258 const RECT highlight_bounds = {min_loc.x - 1, font_y_adjustment_, | 2258 const RECT highlight_bounds = {min_loc.x - 1, font_y_adjustment_, |
| 2259 min_loc.x + 2, font_ascent_ + font_descent_ + font_y_adjustment_}; | 2259 min_loc.x + 2, font_ascent_ + font_descent_ + font_y_adjustment_}; |
| 2260 InvalidateRect(&highlight_bounds, false); | 2260 InvalidateRect(&highlight_bounds, false); |
| 2261 } | 2261 } |
| 2262 } | 2262 } |
| OLD | NEW |