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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
193 // Returns the current instant suggestion text. | 193 // Returns the current instant suggestion text. |
194 virtual string16 GetInstantSuggestion() const = 0; | 194 virtual string16 GetInstantSuggestion() const = 0; |
195 | 195 |
196 // Returns the width in pixels needed to display the current text. The | 196 // Returns the width in pixels needed to display the current text. The |
197 // returned value includes margins. | 197 // returned value includes margins. |
198 virtual int TextWidth() const = 0; | 198 virtual int TextWidth() const = 0; |
199 | 199 |
200 // Returns true if the user is composing something in an IME. | 200 // Returns true if the user is composing something in an IME. |
201 virtual bool IsImeComposing() const = 0; | 201 virtual bool IsImeComposing() const = 0; |
202 | 202 |
203 // Get the bounds of the widget containing the omnibox. | |
204 virtual gfx::Rect GetContainerBounds() const = 0; | |
sky
2012/12/04 23:06:36
It's not clear what you mean by 'container' here,
melevin
2012/12/06 23:13:00
I've removed both functions. The LocationBarView w
| |
205 | |
203 #if defined(TOOLKIT_VIEWS) | 206 #if defined(TOOLKIT_VIEWS) |
204 virtual int GetMaxEditWidth(int entry_width) const = 0; | 207 virtual int GetMaxEditWidth(int entry_width) const = 0; |
205 | 208 |
206 // Adds the autocomplete edit view to view hierarchy and | 209 // Adds the autocomplete edit view to view hierarchy and |
207 // returns the views::View of the edit view. | 210 // returns the views::View of the edit view. |
208 virtual views::View* AddToView(views::View* parent) = 0; | 211 virtual views::View* AddToView(views::View* parent) = 0; |
209 | 212 |
210 // Performs the drop of a drag and drop operation on the view. | 213 // Performs the drop of a drag and drop operation on the view. |
211 virtual int OnPerformDrop(const ui::DropTargetEvent& event) = 0; | 214 virtual int OnPerformDrop(const ui::DropTargetEvent& event) = 0; |
212 | 215 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
251 scoped_ptr<OmniboxEditModel> model_; | 254 scoped_ptr<OmniboxEditModel> model_; |
252 OmniboxEditController* controller_; | 255 OmniboxEditController* controller_; |
253 ToolbarModel* toolbar_model_; | 256 ToolbarModel* toolbar_model_; |
254 | 257 |
255 // The object that handles additional command functionality exposed on the | 258 // The object that handles additional command functionality exposed on the |
256 // edit, such as invoking the keyword editor. | 259 // edit, such as invoking the keyword editor. |
257 CommandUpdater* command_updater_; | 260 CommandUpdater* command_updater_; |
258 }; | 261 }; |
259 | 262 |
260 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ | 263 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ |
OLD | NEW |