| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // Return the number of characters in the current buffer. The name | 238 // Return the number of characters in the current buffer. The name |
| 239 // |GetTextLength| can't be used as the Windows override of this class | 239 // |GetTextLength| can't be used as the Windows override of this class |
| 240 // inherits from a class that defines a method with that name. | 240 // inherits from a class that defines a method with that name. |
| 241 virtual int GetOmniboxTextLength() const = 0; | 241 virtual int GetOmniboxTextLength() const = 0; |
| 242 | 242 |
| 243 // Try to parse the current text as a URL and colorize the components. | 243 // Try to parse the current text as a URL and colorize the components. |
| 244 virtual void EmphasizeURLComponents() = 0; | 244 virtual void EmphasizeURLComponents() = 0; |
| 245 | 245 |
| 246 OmniboxEditController* controller() { return controller_; } | 246 OmniboxEditController* controller() { return controller_; } |
| 247 ToolbarModel* toolbar_model() { return toolbar_model_; } | 247 ToolbarModel* toolbar_model() { return toolbar_model_; } |
| 248 const ToolbarModel* toolbar_model() const { return toolbar_model_; } |
| 248 | 249 |
| 249 private: | 250 private: |
| 250 // |model_| can be NULL in tests. | 251 // |model_| can be NULL in tests. |
| 251 scoped_ptr<OmniboxEditModel> model_; | 252 scoped_ptr<OmniboxEditModel> model_; |
| 252 OmniboxEditController* controller_; | 253 OmniboxEditController* controller_; |
| 253 ToolbarModel* toolbar_model_; | 254 ToolbarModel* toolbar_model_; |
| 254 | 255 |
| 255 // The object that handles additional command functionality exposed on the | 256 // The object that handles additional command functionality exposed on the |
| 256 // edit, such as invoking the keyword editor. | 257 // edit, such as invoking the keyword editor. |
| 257 CommandUpdater* command_updater_; | 258 CommandUpdater* command_updater_; |
| 258 }; | 259 }; |
| 259 | 260 |
| 260 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ | 261 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ |
| OLD | NEW |