OLD | NEW |
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 virtual void OnBeforePossibleChange() OVERRIDE; | 103 virtual void OnBeforePossibleChange() OVERRIDE; |
104 virtual bool OnAfterPossibleChange() OVERRIDE; | 104 virtual bool OnAfterPossibleChange() OVERRIDE; |
105 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 105 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
106 virtual gfx::NativeView GetRelativeWindowForPopup() const OVERRIDE; | 106 virtual gfx::NativeView GetRelativeWindowForPopup() const OVERRIDE; |
107 virtual void SetGrayTextAutocompletion(const base::string16& input) OVERRIDE; | 107 virtual void SetGrayTextAutocompletion(const base::string16& input) OVERRIDE; |
108 virtual base::string16 GetGrayTextAutocompletion() const OVERRIDE; | 108 virtual base::string16 GetGrayTextAutocompletion() const OVERRIDE; |
109 virtual int GetTextWidth() const OVERRIDE; | 109 virtual int GetTextWidth() const OVERRIDE; |
110 virtual int GetWidth() const OVERRIDE; | 110 virtual int GetWidth() const OVERRIDE; |
111 virtual bool IsImeComposing() const OVERRIDE; | 111 virtual bool IsImeComposing() const OVERRIDE; |
112 virtual bool IsImeShowingPopup() const OVERRIDE; | 112 virtual bool IsImeShowingPopup() const OVERRIDE; |
113 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | |
114 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; | |
115 virtual base::string16 GetLabelForCommandId(int command_id) const OVERRIDE; | |
116 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | |
117 | 113 |
118 // views::TextfieldController: | 114 // views::TextfieldController: |
119 virtual void ContentsChanged(views::Textfield* sender, | 115 virtual void ContentsChanged(views::Textfield* sender, |
120 const base::string16& new_contents) OVERRIDE; | 116 const base::string16& new_contents) OVERRIDE; |
121 virtual bool HandleKeyEvent(views::Textfield* sender, | 117 virtual bool HandleKeyEvent(views::Textfield* sender, |
122 const ui::KeyEvent& key_event) OVERRIDE; | 118 const ui::KeyEvent& key_event) OVERRIDE; |
123 virtual void OnBeforeUserAction(views::Textfield* sender) OVERRIDE; | 119 virtual void OnBeforeUserAction(views::Textfield* sender) OVERRIDE; |
124 virtual void OnAfterUserAction(views::Textfield* sender) OVERRIDE; | 120 virtual void OnAfterUserAction(views::Textfield* sender) OVERRIDE; |
125 virtual void OnAfterCutOrCopy() OVERRIDE; | 121 virtual void OnAfterCutOrCopy() OVERRIDE; |
126 virtual void OnWriteDragData(ui::OSExchangeData* data) OVERRIDE; | 122 virtual void OnWriteDragData(ui::OSExchangeData* data) OVERRIDE; |
127 virtual void OnGetDragOperationsForTextfield(int* drag_operations) OVERRIDE; | 123 virtual void OnGetDragOperationsForTextfield(int* drag_operations) OVERRIDE; |
128 virtual void AppendDropFormats( | 124 virtual void AppendDropFormats( |
129 int* formats, | 125 int* formats, |
130 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; | 126 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) OVERRIDE; |
131 virtual int OnDrop(const ui::OSExchangeData& data) OVERRIDE; | 127 virtual int OnDrop(const ui::OSExchangeData& data) OVERRIDE; |
132 virtual void UpdateContextMenu(ui::SimpleMenuModel* menu_contents) OVERRIDE; | 128 virtual void UpdateContextMenu(ui::SimpleMenuModel* menu_contents) OVERRIDE; |
| 129 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
| 130 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; |
| 131 virtual base::string16 GetLabelForCommandId(int command_id) const OVERRIDE; |
| 132 virtual bool HandlesCommand(int command_id) const OVERRIDE; |
| 133 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; |
133 | 134 |
134 #if defined(OS_CHROMEOS) | 135 #if defined(OS_CHROMEOS) |
135 // chromeos::input_method::InputMethodManager::CandidateWindowObserver: | 136 // chromeos::input_method::InputMethodManager::CandidateWindowObserver: |
136 virtual void CandidateWindowOpened( | 137 virtual void CandidateWindowOpened( |
137 chromeos::input_method::InputMethodManager* manager) OVERRIDE; | 138 chromeos::input_method::InputMethodManager* manager) OVERRIDE; |
138 virtual void CandidateWindowClosed( | 139 virtual void CandidateWindowClosed( |
139 chromeos::input_method::InputMethodManager* manager) OVERRIDE; | 140 chromeos::input_method::InputMethodManager* manager) OVERRIDE; |
140 #endif | 141 #endif |
141 | 142 |
142 private: | 143 private: |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 202 |
202 // Indicates if we want to select all text in the omnibox when we get a | 203 // Indicates if we want to select all text in the omnibox when we get a |
203 // GESTURE_TAP. We want to select all only when the textfield is not in focus | 204 // GESTURE_TAP. We want to select all only when the textfield is not in focus |
204 // and gets a tap. So we use this variable to remember focus state before tap. | 205 // and gets a tap. So we use this variable to remember focus state before tap. |
205 bool select_all_on_gesture_tap_; | 206 bool select_all_on_gesture_tap_; |
206 | 207 |
207 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); | 208 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); |
208 }; | 209 }; |
209 | 210 |
210 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 211 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
OLD | NEW |