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