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

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

Issue 10825254: Remove views::KeyEvent, replacing uses of it with ui::KeyEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 LocationBarView* location_bar); 56 LocationBarView* location_bar);
57 virtual ~OmniboxViewViews(); 57 virtual ~OmniboxViewViews();
58 58
59 // Initialize, create the underlying views, etc; 59 // Initialize, create the underlying views, etc;
60 void Init(views::View* popup_parent_view); 60 void Init(views::View* popup_parent_view);
61 61
62 // Sets the colors of the text view according to the theme. 62 // Sets the colors of the text view according to the theme.
63 void SetBaseColor(); 63 void SetBaseColor();
64 64
65 // Called after key even is handled either by HandleKeyEvent or by Textfield. 65 // Called after key even is handled either by HandleKeyEvent or by Textfield.
66 bool HandleAfterKeyEvent(const views::KeyEvent& event, bool handled); 66 bool HandleAfterKeyEvent(const ui::KeyEvent& event, bool handled);
67 67
68 // Called when KeyRelease event is generated on textfield. 68 // Called when KeyRelease event is generated on textfield.
69 bool HandleKeyReleaseEvent(const views::KeyEvent& event); 69 bool HandleKeyReleaseEvent(const ui::KeyEvent& event);
70 70
71 // Called when mouse events are generated on the textfield. 71 // Called when mouse events are generated on the textfield.
72 // The views::Textfield implementations will be executed first. 72 // The views::Textfield implementations will be executed first.
73 void HandleMousePressEvent(const views::MouseEvent& event); 73 void HandleMousePressEvent(const views::MouseEvent& event);
74 void HandleMouseDragEvent(const views::MouseEvent& event); 74 void HandleMouseDragEvent(const views::MouseEvent& event);
75 void HandleMouseReleaseEvent(const views::MouseEvent& event); 75 void HandleMouseReleaseEvent(const views::MouseEvent& event);
76 76
77 // Called when Focus is set/unset on textfield. 77 // Called when Focus is set/unset on textfield.
78 void HandleFocusIn(); 78 void HandleFocusIn();
79 void HandleFocusOut(); 79 void HandleFocusOut();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 virtual int GetMaxEditWidth(int entry_width) const OVERRIDE; 126 virtual int GetMaxEditWidth(int entry_width) const OVERRIDE;
127 virtual views::View* AddToView(views::View* parent) OVERRIDE; 127 virtual views::View* AddToView(views::View* parent) OVERRIDE;
128 virtual int OnPerformDrop(const views::DropTargetEvent& event) OVERRIDE; 128 virtual int OnPerformDrop(const views::DropTargetEvent& event) OVERRIDE;
129 virtual gfx::Font GetFont() OVERRIDE; 129 virtual gfx::Font GetFont() OVERRIDE;
130 virtual int WidthOfTextAfterCursor() OVERRIDE; 130 virtual int WidthOfTextAfterCursor() OVERRIDE;
131 131
132 // views::TextfieldController: 132 // views::TextfieldController:
133 virtual void ContentsChanged(views::Textfield* sender, 133 virtual void ContentsChanged(views::Textfield* sender,
134 const string16& new_contents) OVERRIDE; 134 const string16& new_contents) OVERRIDE;
135 virtual bool HandleKeyEvent(views::Textfield* sender, 135 virtual bool HandleKeyEvent(views::Textfield* sender,
136 const views::KeyEvent& key_event) OVERRIDE; 136 const ui::KeyEvent& key_event) OVERRIDE;
137 virtual void OnBeforeUserAction(views::Textfield* sender) OVERRIDE; 137 virtual void OnBeforeUserAction(views::Textfield* sender) OVERRIDE;
138 virtual void OnAfterUserAction(views::Textfield* sender) OVERRIDE; 138 virtual void OnAfterUserAction(views::Textfield* sender) OVERRIDE;
139 virtual void OnAfterCutOrCopy() OVERRIDE; 139 virtual void OnAfterCutOrCopy() OVERRIDE;
140 virtual void OnWriteDragData(ui::OSExchangeData* data) OVERRIDE; 140 virtual void OnWriteDragData(ui::OSExchangeData* data) OVERRIDE;
141 virtual void UpdateContextMenu(ui::SimpleMenuModel* menu_contents) OVERRIDE; 141 virtual void UpdateContextMenu(ui::SimpleMenuModel* menu_contents) OVERRIDE;
142 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; 142 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
143 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; 143 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE;
144 virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE; 144 virtual string16 GetLabelForCommandId(int command_id) const OVERRIDE;
145 virtual void ExecuteCommand(int command_id) OVERRIDE; 145 virtual void ExecuteCommand(int command_id) OVERRIDE;
146 146
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 // Should we select all the text when we see the mouse button get released? 198 // Should we select all the text when we see the mouse button get released?
199 // We select in response to a click that focuses the omnibox, but we defer 199 // We select in response to a click that focuses the omnibox, but we defer
200 // until release, setting this variable back to false if we saw a drag, to 200 // until release, setting this variable back to false if we saw a drag, to
201 // allow the user to select just a portion of the text. 201 // allow the user to select just a portion of the text.
202 bool select_all_on_mouse_release_; 202 bool select_all_on_mouse_release_;
203 203
204 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); 204 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews);
205 }; 205 };
206 206
207 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ 207 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/zoom_view.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698