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/autocomplete/autocomplete_edit_view_win.h" | 5 #include "chrome/browser/autocomplete/autocomplete_edit_view_win.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <locale> | 8 #include <locale> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "chrome/browser/autocomplete/autocomplete_match.h" | 24 #include "chrome/browser/autocomplete/autocomplete_match.h" |
25 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" | 25 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
26 #include "chrome/browser/autocomplete/keyword_provider.h" | 26 #include "chrome/browser/autocomplete/keyword_provider.h" |
27 #include "chrome/browser/browser_process.h" | 27 #include "chrome/browser/browser_process.h" |
28 #include "chrome/browser/command_updater.h" | 28 #include "chrome/browser/command_updater.h" |
29 #include "chrome/browser/metrics/user_metrics.h" | 29 #include "chrome/browser/metrics/user_metrics.h" |
30 #include "chrome/browser/net/url_fixer_upper.h" | 30 #include "chrome/browser/net/url_fixer_upper.h" |
31 #include "chrome/browser/profiles/profile.h" | 31 #include "chrome/browser/profiles/profile.h" |
32 #include "chrome/browser/search_engines/template_url.h" | 32 #include "chrome/browser/search_engines/template_url.h" |
33 #include "chrome/browser/search_engines/template_url_model.h" | 33 #include "chrome/browser/search_engines/template_url_model.h" |
34 #include "chrome/browser/tab_contents/tab_contents.h" | |
35 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 34 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
36 #include "chrome/common/notification_service.h" | 35 #include "chrome/common/notification_service.h" |
| 36 #include "content/browser/tab_contents/tab_contents.h" |
37 #include "googleurl/src/url_util.h" | 37 #include "googleurl/src/url_util.h" |
38 #include "grit/generated_resources.h" | 38 #include "grit/generated_resources.h" |
39 #include "net/base/escape.h" | 39 #include "net/base/escape.h" |
40 #include "skia/ext/skia_utils_win.h" | 40 #include "skia/ext/skia_utils_win.h" |
41 #include "ui/base/clipboard/clipboard.h" | 41 #include "ui/base/clipboard/clipboard.h" |
42 #include "ui/base/clipboard/scoped_clipboard_writer.h" | 42 #include "ui/base/clipboard/scoped_clipboard_writer.h" |
43 #include "ui/base/dragdrop/drag_drop_types.h" | 43 #include "ui/base/dragdrop/drag_drop_types.h" |
44 #include "ui/base/dragdrop/drag_source.h" | 44 #include "ui/base/dragdrop/drag_source.h" |
45 #include "ui/base/dragdrop/drop_target.h" | 45 #include "ui/base/dragdrop/drop_target.h" |
46 #include "ui/base/dragdrop/os_exchange_data.h" | 46 #include "ui/base/dragdrop/os_exchange_data.h" |
(...skipping 2573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2620 // PosFromChar(i) might return 0 when i is greater than 1. | 2620 // PosFromChar(i) might return 0 when i is greater than 1. |
2621 return font_.GetStringWidth(text) + GetHorizontalMargin(); | 2621 return font_.GetStringWidth(text) + GetHorizontalMargin(); |
2622 } | 2622 } |
2623 | 2623 |
2624 bool AutocompleteEditViewWin::IsCaretAtEnd() const { | 2624 bool AutocompleteEditViewWin::IsCaretAtEnd() const { |
2625 long length = GetTextLength(); | 2625 long length = GetTextLength(); |
2626 CHARRANGE sel; | 2626 CHARRANGE sel; |
2627 GetSelection(sel); | 2627 GetSelection(sel); |
2628 return sel.cpMin == sel.cpMax && sel.cpMin == length; | 2628 return sel.cpMin == sel.cpMax && sel.cpMin == length; |
2629 } | 2629 } |
OLD | NEW |