| 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 "base/base_drag_source.h" | 9 #include "base/base_drag_source.h" |
| 10 #include "base/base_drop_target.h" | 10 #include "base/base_drop_target.h" |
| (...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1635 OnAfterPossibleChange(); | 1635 OnAfterPossibleChange(); |
| 1636 } | 1636 } |
| 1637 | 1637 |
| 1638 bool AutocompleteEditViewWin::OnKeyDownOnlyWritable(TCHAR key, | 1638 bool AutocompleteEditViewWin::OnKeyDownOnlyWritable(TCHAR key, |
| 1639 UINT repeat_count, | 1639 UINT repeat_count, |
| 1640 UINT flags) { | 1640 UINT flags) { |
| 1641 // NOTE: Annoyingly, ctrl-alt-<key> generates WM_KEYDOWN rather than | 1641 // NOTE: Annoyingly, ctrl-alt-<key> generates WM_KEYDOWN rather than |
| 1642 // WM_SYSKEYDOWN, so we need to check (flags & KF_ALTDOWN) in various places | 1642 // WM_SYSKEYDOWN, so we need to check (flags & KF_ALTDOWN) in various places |
| 1643 // in this function even with a WM_SYSKEYDOWN handler. | 1643 // in this function even with a WM_SYSKEYDOWN handler. |
| 1644 | 1644 |
| 1645 // Update LocationBarView::ShouldLookupAccelerators() as well when you add |
| 1646 // some key combinations here. |
| 1645 int count = repeat_count; | 1647 int count = repeat_count; |
| 1646 switch (key) { | 1648 switch (key) { |
| 1647 case VK_RETURN: | 1649 case VK_RETURN: |
| 1648 model_->AcceptInput((flags & KF_ALTDOWN) ? | 1650 model_->AcceptInput((flags & KF_ALTDOWN) ? |
| 1649 NEW_FOREGROUND_TAB : CURRENT_TAB, false); | 1651 NEW_FOREGROUND_TAB : CURRENT_TAB, false); |
| 1650 return true; | 1652 return true; |
| 1651 | 1653 |
| 1652 case VK_PRIOR: | 1654 case VK_PRIOR: |
| 1653 case VK_NEXT: | 1655 case VK_NEXT: |
| 1654 count = model_->result().size(); | 1656 count = model_->result().size(); |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2252 } | 2254 } |
| 2253 | 2255 |
| 2254 void AutocompleteEditViewWin::RepaintDropHighlight(int position) { | 2256 void AutocompleteEditViewWin::RepaintDropHighlight(int position) { |
| 2255 if ((position != -1) && (position <= GetTextLength())) { | 2257 if ((position != -1) && (position <= GetTextLength())) { |
| 2256 const POINT min_loc(PosFromChar(position)); | 2258 const POINT min_loc(PosFromChar(position)); |
| 2257 const RECT highlight_bounds = {min_loc.x - 1, font_y_adjustment_, | 2259 const RECT highlight_bounds = {min_loc.x - 1, font_y_adjustment_, |
| 2258 min_loc.x + 2, font_ascent_ + font_descent_ + font_y_adjustment_}; | 2260 min_loc.x + 2, font_ascent_ + font_descent_ + font_y_adjustment_}; |
| 2259 InvalidateRect(&highlight_bounds, false); | 2261 InvalidateRect(&highlight_bounds, false); |
| 2260 } | 2262 } |
| 2261 } | 2263 } |
| OLD | NEW |