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 // This file defines the interface class OmniboxView. Each toolkit will | 5 // This file defines the interface class OmniboxView. Each toolkit will |
6 // implement the edit view differently, so that code is inherently platform | 6 // implement the edit view differently, so that code is inherently platform |
7 // specific. However, the OmniboxEditModel needs to do some communication with | 7 // specific. However, the OmniboxEditModel needs to do some communication with |
8 // the view. Since the model is shared between platforms, we need to define an | 8 // the view. Since the model is shared between platforms, we need to define an |
9 // interface that all view implementations will share. | 9 // interface that all view implementations will share. |
10 | 10 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 virtual string16 GetInstantSuggestion() const = 0; | 203 virtual string16 GetInstantSuggestion() const = 0; |
204 | 204 |
205 // Returns the width in pixels needed to display the current text. The | 205 // Returns the width in pixels needed to display the current text. The |
206 // returned value includes margins. | 206 // returned value includes margins. |
207 virtual int TextWidth() const = 0; | 207 virtual int TextWidth() const = 0; |
208 | 208 |
209 // Returns true if the user is composing something in an IME. | 209 // Returns true if the user is composing something in an IME. |
210 virtual bool IsImeComposing() const = 0; | 210 virtual bool IsImeComposing() const = 0; |
211 | 211 |
212 // Returns true if an IME is showing a popup window, which may overlap | 212 // Returns true if an IME is showing a popup window, which may overlap |
213 // the omnibox's popup window. | 213 // the omnibox's popup window. Returns false if it's not detectable. |
214 virtual bool IsImeShowingPopup() const; | 214 virtual bool IsImeShowingPopup() const; |
215 | 215 |
216 #if defined(TOOLKIT_VIEWS) | 216 #if defined(TOOLKIT_VIEWS) |
217 virtual int GetMaxEditWidth(int entry_width) const = 0; | 217 virtual int GetMaxEditWidth(int entry_width) const = 0; |
218 | 218 |
219 // Adds the autocomplete edit view to view hierarchy and | 219 // Adds the autocomplete edit view to view hierarchy and |
220 // returns the views::View of the edit view. | 220 // returns the views::View of the edit view. |
221 virtual views::View* AddToView(views::View* parent) = 0; | 221 virtual views::View* AddToView(views::View* parent) = 0; |
222 | 222 |
223 // Performs the drop of a drag and drop operation on the view. | 223 // Performs the drop of a drag and drop operation on the view. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 scoped_ptr<OmniboxEditModel> model_; | 259 scoped_ptr<OmniboxEditModel> model_; |
260 OmniboxEditController* controller_; | 260 OmniboxEditController* controller_; |
261 ToolbarModel* toolbar_model_; | 261 ToolbarModel* toolbar_model_; |
262 | 262 |
263 // The object that handles additional command functionality exposed on the | 263 // The object that handles additional command functionality exposed on the |
264 // edit, such as invoking the keyword editor. | 264 // edit, such as invoking the keyword editor. |
265 CommandUpdater* command_updater_; | 265 CommandUpdater* command_updater_; |
266 }; | 266 }; |
267 | 267 |
268 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ | 268 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ |
OLD | NEW |