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

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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 int action); 275 int action);
277 276
278 // Returns true if |edit_text| starting at |current_pos| is "://". 277 // Returns true if |edit_text| starting at |current_pos| is "://".
279 static bool SchemeEnd(LPTSTR edit_text, int current_pos, int length); 278 static bool SchemeEnd(LPTSTR edit_text, int current_pos, int length);
280 279
281 // Message handlers 280 // Message handlers
282 void OnChar(TCHAR ch, UINT repeat_count, UINT flags); 281 void OnChar(TCHAR ch, UINT repeat_count, UINT flags);
283 void OnContextMenu(HWND window, const CPoint& point); 282 void OnContextMenu(HWND window, const CPoint& point);
284 void OnCopy(); 283 void OnCopy();
285 void OnCut(); 284 void OnCut();
286 LRESULT OnGetObject(UINT uMsg, WPARAM wparam, LPARAM lparam); 285 LRESULT OnGetObject(UINT message, WPARAM wparam, LPARAM lparam);
287 LRESULT OnImeComposition(UINT message, WPARAM wparam, LPARAM lparam); 286 LRESULT OnImeComposition(UINT message, WPARAM wparam, LPARAM lparam);
288 LRESULT OnImeNotify(UINT message, WPARAM wparam, LPARAM lparam); 287 LRESULT OnImeNotify(UINT message, WPARAM wparam, LPARAM lparam);
289 void OnKeyDown(TCHAR key, UINT repeat_count, UINT flags); 288 void OnKeyDown(TCHAR key, UINT repeat_count, UINT flags);
290 void OnKeyUp(TCHAR key, UINT repeat_count, UINT flags); 289 void OnKeyUp(TCHAR key, UINT repeat_count, UINT flags);
291 void OnKillFocus(HWND focus_wnd); 290 void OnKillFocus(HWND focus_wnd);
292 void OnLButtonDblClk(UINT keys, const CPoint& point); 291 void OnLButtonDblClk(UINT keys, const CPoint& point);
293 void OnLButtonDown(UINT keys, const CPoint& point); 292 void OnLButtonDown(UINT keys, const CPoint& point);
294 void OnLButtonUp(UINT keys, const CPoint& point); 293 void OnLButtonUp(UINT keys, const CPoint& point);
295 void OnMButtonDblClk(UINT keys, const CPoint& point); 294 void OnMButtonDblClk(UINT keys, const CPoint& point);
296 void OnMButtonDown(UINT keys, const CPoint& point); 295 void OnMButtonDown(UINT keys, const CPoint& point);
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 // This interface is useful for accessing the CRichEditCtrl at a low level. 542 // This interface is useful for accessing the CRichEditCtrl at a low level.
544 mutable ITextDocument* text_object_model_; 543 mutable ITextDocument* text_object_model_;
545 544
546 // This contains the scheme char start and stop indexes that should be 545 // This contains the scheme char start and stop indexes that should be
547 // stricken-out when displaying an insecure scheme. 546 // stricken-out when displaying an insecure scheme.
548 url_parse::Component insecure_scheme_component_; 547 url_parse::Component insecure_scheme_component_;
549 548
550 // Instance of accessibility information and handling. 549 // Instance of accessibility information and handling.
551 mutable base::win::ScopedComPtr<IAccessible> autocomplete_accessibility_; 550 mutable base::win::ScopedComPtr<IAccessible> autocomplete_accessibility_;
552 551
552 // The native view host.
553 views::NativeViewHost* native_view_host_;
554
553 DISALLOW_COPY_AND_ASSIGN(OmniboxViewWin); 555 DISALLOW_COPY_AND_ASSIGN(OmniboxViewWin);
554 }; 556 };
555 557
556 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_ 558 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698