Index: chrome/browser/ui/views/omnibox/omnibox_view_views.h |
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.h b/chrome/browser/ui/views/omnibox/omnibox_view_views.h |
index 22cac0d0159b84382e515aa7b3f375577a1287db..49ba6cb60457f01e81abf8451e9f1acd73ce4ec0 100644 |
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.h |
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.h |
@@ -13,8 +13,8 @@ |
#include "chrome/browser/ui/toolbar/toolbar_model.h" |
#include "ui/base/range/range.h" |
#include "ui/base/window_open_disposition.h" |
+#include "ui/views/controls/textfield/textfield.h" |
#include "ui/views/controls/textfield/textfield_controller.h" |
-#include "ui/views/view.h" |
#if defined(OS_CHROMEOS) |
#include "chrome/browser/chromeos/input_method/input_method_manager.h" |
@@ -29,15 +29,8 @@ class OSExchangeData; |
} // namespace ui |
// Views-implementation of OmniboxView. This is based on gtk implementation. |
-// The following features are not yet supported. |
-// |
-// LTR support. |
-// Drag and drop behavior. |
-// Adjust paste behavior (should not autocomplete). |
-// Custom context menu for omnibox. |
-// Instant. |
Peter Kasting
2013/02/18 18:57:47
Are these all fixed, then?
msw
2013/02/18 20:58:21
All of these are supported except perhaps Instant,
|
class OmniboxViewViews |
- : public views::View, |
+ : public views::Textfield, |
public OmniboxView, |
#if defined(OS_CHROMEOS) |
public |
@@ -62,37 +55,18 @@ class OmniboxViewViews |
// Sets the colors of the text view according to the theme. |
void SetBaseColor(); |
- // Called after key even is handled either by HandleKeyEvent or by Textfield. |
- bool HandleAfterKeyEvent(const ui::KeyEvent& event, bool handled); |
- |
- // Called when KeyRelease event is generated on textfield. |
- bool HandleKeyReleaseEvent(const ui::KeyEvent& event); |
- |
- // Called when mouse events are generated on the textfield. |
- // The views::Textfield implementations will be executed first. |
- void HandleMousePressEvent(const ui::MouseEvent& event); |
- void HandleMouseDragEvent(const ui::MouseEvent& event); |
- void HandleMouseReleaseEvent(const ui::MouseEvent& event); |
- |
- // Called when a gesture event is generated on textfield. |
- void HandleGestureEvent(const ui::GestureEvent& event); |
- |
- // Called when Focus is set/unset on textfield. |
- void HandleFocusIn(); |
- void HandleFocusOut(); |
- |
- // Sets whether the location entry can accept focus. |
- void SetLocationEntryFocusable(bool focusable); |
- |
- // Returns true if the location entry is focusable and visible in |
- // the root view. |
- bool IsLocationEntryFocusableInRootView() const; |
- |
- // Implements views::View |
- virtual void Layout() OVERRIDE; |
- virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
+ // views::View: |
Peter Kasting
2013/02/18 18:57:47
Nit: We don't directly override View, perhaps this
msw
2013/02/18 20:58:21
Done.
|
virtual std::string GetClassName() const OVERRIDE; |
+ virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
+ virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; |
+ virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
+ virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; |
+ virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
+ virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
+ virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; |
+ virtual void OnFocus() OVERRIDE; |
+ virtual void OnBlur() OVERRIDE; |
// OmniboxView: |
virtual void SaveStateToTab(content::WebContents* tab) OVERRIDE; |
@@ -162,11 +136,8 @@ class OmniboxViewViews |
#endif |
private: |
- class AutocompleteTextfield; |
- |
// Return the number of characers in the current buffer. |
virtual int GetOmniboxTextLength() const OVERRIDE; |
- size_t GetTextLength() const; |
// Try to parse the current text as a URL and colorize the components. |
virtual void EmphasizeURLComponents() OVERRIDE; |
@@ -189,8 +160,6 @@ class OmniboxViewViews |
// that after invoking this OnAfterPossibleChange() is invoked. |
void OnPaste(); |
- views::Textfield* textfield_; |
- |
// When true, the location bar view is read only and also is has a slightly |
// different presentation (smaller font size). This is used for popups. |
bool popup_window_mode_; |