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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_view_win.h

Issue 8391010: Improve omnibox accessibility on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
OLDNEW
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 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <atlbase.h> 9 #include <atlbase.h>
10 #include <atlapp.h> 10 #include <atlapp.h>
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view. h" 21 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view. h"
22 #include "ui/base/models/simple_menu_model.h" 22 #include "ui/base/models/simple_menu_model.h"
23 #include "ui/gfx/font.h" 23 #include "ui/gfx/font.h"
24 #include "views/controls/menu/menu_2.h" 24 #include "views/controls/menu/menu_2.h"
25 #include "webkit/glue/window_open_disposition.h" 25 #include "webkit/glue/window_open_disposition.h"
26 26
27 class AutocompleteEditController; 27 class AutocompleteEditController;
28 class AutocompleteEditModel; 28 class AutocompleteEditModel;
29 class AutocompletePopupView; 29 class AutocompletePopupView;
30 class LocationBarView; 30 class LocationBarView;
31 class OmniboxViewWrapper;
31 class TabContents; 32 class TabContents;
32 33
33 namespace views { 34 namespace views {
35 class NativeViewHost;
34 class View; 36 class View;
35 } 37 }
36 38
37 // Provides the implementation of an edit control with a drop-down 39 // Provides the implementation of an edit control with a drop-down
38 // autocomplete box. The box itself is implemented in autocomplete_popup.cc 40 // autocomplete box. The box itself is implemented in autocomplete_popup.cc
39 // This file implements the edit box and management for the popup. 41 // This file implements the edit box and management for the popup.
40 class OmniboxViewWin 42 class OmniboxViewWin
41 : public CWindowImpl<OmniboxViewWin, 43 : public CWindowImpl<OmniboxViewWin,
42 CRichEditCtrl, 44 CRichEditCtrl,
43 CWinTraits<WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL | 45 CWinTraits<WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 bool update_popup) OVERRIDE; 112 bool update_popup) OVERRIDE;
111 113
112 virtual void SetWindowTextAndCaretPos(const string16& text, 114 virtual void SetWindowTextAndCaretPos(const string16& text,
113 size_t caret_pos) OVERRIDE; 115 size_t caret_pos) OVERRIDE;
114 116
115 virtual void SetForcedQuery() OVERRIDE; 117 virtual void SetForcedQuery() OVERRIDE;
116 118
117 virtual bool IsSelectAll() OVERRIDE; 119 virtual bool IsSelectAll() OVERRIDE;
118 virtual bool DeleteAtEndPressed() OVERRIDE; 120 virtual bool DeleteAtEndPressed() OVERRIDE;
119 virtual void GetSelectionBounds(string16::size_type* start, 121 virtual void GetSelectionBounds(string16::size_type* start,
120 string16::size_type* end) OVERRIDE; 122 string16::size_type* end) const OVERRIDE;
121 virtual void SelectAll(bool reversed) OVERRIDE; 123 virtual void SelectAll(bool reversed) OVERRIDE;
122 virtual void RevertAll() OVERRIDE; 124 virtual void RevertAll() OVERRIDE;
123 125
124 virtual void UpdatePopup() OVERRIDE; 126 virtual void UpdatePopup() OVERRIDE;
125 virtual void ClosePopup() OVERRIDE; 127 virtual void ClosePopup() OVERRIDE;
126 128
127 virtual void SetFocus() OVERRIDE; 129 virtual void SetFocus() OVERRIDE;
128 130
129 virtual void OnTemporaryTextMaybeChanged( 131 virtual void OnTemporaryTextMaybeChanged(
130 const string16& display_text, 132 const string16& display_text,
(...skipping 10 matching lines...) Expand all
141 bool animate_to_complete) OVERRIDE; 143 bool animate_to_complete) OVERRIDE;
142 virtual int TextWidth() const OVERRIDE; 144 virtual int TextWidth() const OVERRIDE;
143 virtual string16 GetInstantSuggestion() const OVERRIDE; 145 virtual string16 GetInstantSuggestion() const OVERRIDE;
144 virtual bool IsImeComposing() const OVERRIDE; 146 virtual bool IsImeComposing() const OVERRIDE;
145 147
146 virtual views::View* AddToView(views::View* parent) OVERRIDE; 148 virtual views::View* AddToView(views::View* parent) OVERRIDE;
147 virtual int OnPerformDrop(const views::DropTargetEvent& event) OVERRIDE; 149 virtual int OnPerformDrop(const views::DropTargetEvent& event) OVERRIDE;
148 150
149 int GetPopupMaxYCoordinate(); 151 int GetPopupMaxYCoordinate();
150 152
151 // Exposes custom IAccessible implementation to the overall MSAA hierarchy.
152 IAccessible* GetIAccessible();
153
154 void SetDropHighlightPosition(int position); 153 void SetDropHighlightPosition(int position);
155 int drop_highlight_position() const { return drop_highlight_position_; } 154 int drop_highlight_position() const { return drop_highlight_position_; }
156 155
157 // Returns true if a drag a drop session was initiated by this edit. 156 // Returns true if a drag a drop session was initiated by this edit.
158 bool in_drag() const { return in_drag_; } 157 bool in_drag() const { return in_drag_; }
159 158
160 // Moves the selected text to the specified position. 159 // Moves the selected text to the specified position.
161 void MoveSelectedText(int new_position); 160 void MoveSelectedText(int new_position);
162 161
163 // Inserts the text at the specified position. 162 // Inserts the text at the specified position.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 int action); 274 int action);
276 275
277 // Returns true if |edit_text| starting at |current_pos| is "://". 276 // Returns true if |edit_text| starting at |current_pos| is "://".
278 static bool SchemeEnd(LPTSTR edit_text, int current_pos, int length); 277 static bool SchemeEnd(LPTSTR edit_text, int current_pos, int length);
279 278
280 // Message handlers 279 // Message handlers
281 void OnChar(TCHAR ch, UINT repeat_count, UINT flags); 280 void OnChar(TCHAR ch, UINT repeat_count, UINT flags);
282 void OnContextMenu(HWND window, const CPoint& point); 281 void OnContextMenu(HWND window, const CPoint& point);
283 void OnCopy(); 282 void OnCopy();
284 void OnCut(); 283 void OnCut();
285 LRESULT OnGetObject(UINT uMsg, WPARAM wparam, LPARAM lparam); 284 LRESULT OnGetObject(UINT message, WPARAM wparamm, LPARAM lparam);
sky 2011/10/25 20:08:45 wparamm -> wparam
dmazzoni 2011/10/26 16:46:13 Done.
286 LRESULT OnImeComposition(UINT message, WPARAM wparam, LPARAM lparam); 285 LRESULT OnImeComposition(UINT message, WPARAM wparam, LPARAM lparam);
287 void OnKeyDown(TCHAR key, UINT repeat_count, UINT flags); 286 void OnKeyDown(TCHAR key, UINT repeat_count, UINT flags);
288 void OnKeyUp(TCHAR key, UINT repeat_count, UINT flags); 287 void OnKeyUp(TCHAR key, UINT repeat_count, UINT flags);
289 void OnKillFocus(HWND focus_wnd); 288 void OnKillFocus(HWND focus_wnd);
290 void OnLButtonDblClk(UINT keys, const CPoint& point); 289 void OnLButtonDblClk(UINT keys, const CPoint& point);
291 void OnLButtonDown(UINT keys, const CPoint& point); 290 void OnLButtonDown(UINT keys, const CPoint& point);
292 void OnLButtonUp(UINT keys, const CPoint& point); 291 void OnLButtonUp(UINT keys, const CPoint& point);
293 void OnMButtonDblClk(UINT keys, const CPoint& point); 292 void OnMButtonDblClk(UINT keys, const CPoint& point);
294 void OnMButtonDown(UINT keys, const CPoint& point); 293 void OnMButtonDown(UINT keys, const CPoint& point);
295 void OnMButtonUp(UINT keys, const CPoint& point); 294 void OnMButtonUp(UINT keys, const CPoint& point);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 // This interface is useful for accessing the CRichEditCtrl at a low level. 536 // This interface is useful for accessing the CRichEditCtrl at a low level.
538 mutable ITextDocument* text_object_model_; 537 mutable ITextDocument* text_object_model_;
539 538
540 // This contains the scheme char start and stop indexes that should be 539 // This contains the scheme char start and stop indexes that should be
541 // stricken-out when displaying an insecure scheme. 540 // stricken-out when displaying an insecure scheme.
542 url_parse::Component insecure_scheme_component_; 541 url_parse::Component insecure_scheme_component_;
543 542
544 // Instance of accessibility information and handling. 543 // Instance of accessibility information and handling.
545 mutable base::win::ScopedComPtr<IAccessible> autocomplete_accessibility_; 544 mutable base::win::ScopedComPtr<IAccessible> autocomplete_accessibility_;
546 545
546 // The native view host.
547 views::NativeViewHost* native_view_host_;
548
547 DISALLOW_COPY_AND_ASSIGN(OmniboxViewWin); 549 DISALLOW_COPY_AND_ASSIGN(OmniboxViewWin);
548 }; 550 };
549 551
550 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ 552 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698