| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 // Returns the gfx::NativeView of the edit view. | 178 // Returns the gfx::NativeView of the edit view. |
| 179 virtual gfx::NativeView GetNativeView() const = 0; | 179 virtual gfx::NativeView GetNativeView() const = 0; |
| 180 | 180 |
| 181 // Gets the relative window for the pop up window of OmniboxPopupView. The pop | 181 // Gets the relative window for the pop up window of OmniboxPopupView. The pop |
| 182 // up window will be shown under the relative window. When an IME is attached | 182 // up window will be shown under the relative window. When an IME is attached |
| 183 // to the rich edit control, the IME window is the relative window. Otherwise, | 183 // to the rich edit control, the IME window is the relative window. Otherwise, |
| 184 // the top-most window is the relative window. | 184 // the top-most window is the relative window. |
| 185 virtual gfx::NativeView GetRelativeWindowForPopup() const = 0; | 185 virtual gfx::NativeView GetRelativeWindowForPopup() const = 0; |
| 186 | 186 |
| 187 // Shows the instant suggestion text. If |animate_to_complete| is true the | 187 // Shows the instant suggestion text. |
| 188 // view should start an animation that when done commits the text. | 188 virtual void SetInstantSuggestion(const string16& input) = 0; |
| 189 virtual void SetInstantSuggestion(const string16& input, | |
| 190 bool animate_to_complete) = 0; | |
| 191 | 189 |
| 192 // Returns the current instant suggestion text. | 190 // Returns the current instant suggestion text. |
| 193 virtual string16 GetInstantSuggestion() const = 0; | 191 virtual string16 GetInstantSuggestion() const = 0; |
| 194 | 192 |
| 195 // Returns the width in pixels needed to display the current text. The | 193 // Returns the width in pixels needed to display the current text. The |
| 196 // returned value includes margins. | 194 // returned value includes margins. |
| 197 virtual int TextWidth() const = 0; | 195 virtual int TextWidth() const = 0; |
| 198 | 196 |
| 199 // Returns true if the user is composing something in an IME. | 197 // Returns true if the user is composing something in an IME. |
| 200 virtual bool IsImeComposing() const = 0; | 198 virtual bool IsImeComposing() const = 0; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 scoped_ptr<OmniboxEditModel> model_; | 250 scoped_ptr<OmniboxEditModel> model_; |
| 253 OmniboxEditController* controller_; | 251 OmniboxEditController* controller_; |
| 254 ToolbarModel* toolbar_model_; | 252 ToolbarModel* toolbar_model_; |
| 255 | 253 |
| 256 // The object that handles additional command functionality exposed on the | 254 // The object that handles additional command functionality exposed on the |
| 257 // edit, such as invoking the keyword editor. | 255 // edit, such as invoking the keyword editor. |
| 258 CommandUpdater* command_updater_; | 256 CommandUpdater* command_updater_; |
| 259 }; | 257 }; |
| 260 | 258 |
| 261 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ | 259 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ |
| OLD | NEW |