Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit_view_win.cc

Issue 63061: Fix mouse wheel redirection when omnibox has focus... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_win.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 20 matching lines...) Expand all
31 #include "chrome/browser/tab_contents/tab_contents.h" 31 #include "chrome/browser/tab_contents/tab_contents.h"
32 #include "chrome/browser/views/location_bar_view.h" 32 #include "chrome/browser/views/location_bar_view.h"
33 #include "chrome/common/clipboard_service.h" 33 #include "chrome/common/clipboard_service.h"
34 #include "chrome/common/gfx/chrome_canvas.h" 34 #include "chrome/common/gfx/chrome_canvas.h"
35 #include "chrome/common/gfx/utils.h" 35 #include "chrome/common/gfx/utils.h"
36 #include "chrome/common/l10n_util.h" 36 #include "chrome/common/l10n_util.h"
37 #include "chrome/common/l10n_util_win.h" 37 #include "chrome/common/l10n_util_win.h"
38 #include "chrome/common/notification_service.h" 38 #include "chrome/common/notification_service.h"
39 #include "chrome/common/os_exchange_data.h" 39 #include "chrome/common/os_exchange_data.h"
40 #include "chrome/common/win_util.h" 40 #include "chrome/common/win_util.h"
41 #include "chrome/views/focus/focus_util_win.h"
41 #include "googleurl/src/url_util.h" 42 #include "googleurl/src/url_util.h"
42 #include "grit/generated_resources.h" 43 #include "grit/generated_resources.h"
43 #include "skia/ext/skia_utils_win.h" 44 #include "skia/ext/skia_utils_win.h"
44 45
45 #pragma comment(lib, "oleacc.lib") // Needed for accessibility support. 46 #pragma comment(lib, "oleacc.lib") // Needed for accessibility support.
46 47
47 /////////////////////////////////////////////////////////////////////////////// 48 ///////////////////////////////////////////////////////////////////////////////
48 // AutocompleteEditModel 49 // AutocompleteEditModel
49 50
50 // A single AutocompleteController used solely for making synchronous calls to 51 // A single AutocompleteController used solely for making synchronous calls to
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 if (ch == VK_SPACE) 1605 if (ch == VK_SPACE)
1605 SetMsgHandled(false); 1606 SetMsgHandled(false);
1606 } 1607 }
1607 1608
1608 void AutocompleteEditViewWin::OnWindowPosChanging(WINDOWPOS* window_pos) { 1609 void AutocompleteEditViewWin::OnWindowPosChanging(WINDOWPOS* window_pos) {
1609 if (force_hidden_) 1610 if (force_hidden_)
1610 window_pos->flags &= ~SWP_SHOWWINDOW; 1611 window_pos->flags &= ~SWP_SHOWWINDOW;
1611 SetMsgHandled(true); 1612 SetMsgHandled(true);
1612 } 1613 }
1613 1614
1615
Peter Kasting 2009/04/08 16:54:20 Nit: extra newline
1616 BOOL AutocompleteEditViewWin::OnMouseWheel(UINT flags,
1617 short delta,
1618 CPoint point) {
1619 // Forward the mouse-wheel message to the window under the mouse.
1620 if (!views::RerouteMouseWheel(m_hWnd, MAKEWPARAM(flags, delta),
1621 MAKELPARAM(point.x, point.y)))
1622 SetMsgHandled(FALSE);
1623 return 0;
1624 }
1625
1614 void AutocompleteEditViewWin::HandleKeystroke(UINT message, 1626 void AutocompleteEditViewWin::HandleKeystroke(UINT message,
1615 TCHAR key, 1627 TCHAR key,
1616 UINT repeat_count, 1628 UINT repeat_count,
1617 UINT flags) { 1629 UINT flags) {
1618 ScopedFreeze freeze(this, GetTextObjectModel()); 1630 ScopedFreeze freeze(this, GetTextObjectModel());
1619 OnBeforePossibleChange(); 1631 OnBeforePossibleChange();
1620 DefWindowProc(message, key, MAKELPARAM(repeat_count, flags)); 1632 DefWindowProc(message, key, MAKELPARAM(repeat_count, flags));
1621 OnAfterPossibleChange(); 1633 OnAfterPossibleChange();
1622 } 1634 }
1623 1635
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
2208 } 2220 }
2209 2221
2210 void AutocompleteEditViewWin::RepaintDropHighlight(int position) { 2222 void AutocompleteEditViewWin::RepaintDropHighlight(int position) {
2211 if ((position != -1) && (position <= GetTextLength())) { 2223 if ((position != -1) && (position <= GetTextLength())) {
2212 const POINT min_loc(PosFromChar(position)); 2224 const POINT min_loc(PosFromChar(position));
2213 const RECT highlight_bounds = {min_loc.x - 1, font_y_adjustment_, 2225 const RECT highlight_bounds = {min_loc.x - 1, font_y_adjustment_,
2214 min_loc.x + 2, font_ascent_ + font_descent_ + font_y_adjustment_}; 2226 min_loc.x + 2, font_ascent_ + font_descent_ + font_y_adjustment_};
2215 InvalidateRect(&highlight_bounds, false); 2227 InvalidateRect(&highlight_bounds, false);
2216 } 2228 }
2217 } 2229 }
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698