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 AutocompleteEditModel needs to do some communication | 7 // specific. However, the AutocompleteEditModel needs to do some communication |
8 // with the view. Since the model is shared between platforms, we need to | 8 // with the view. Since the model is shared between platforms, we need to |
9 // define an interface that all view implementations will share. | 9 // define an interface that all view implementations will share. |
10 | 10 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 virtual views::View* AddToView(views::View* parent) = 0; | 210 virtual views::View* AddToView(views::View* parent) = 0; |
211 | 211 |
212 // Performs the drop of a drag and drop operation on the view. | 212 // Performs the drop of a drag and drop operation on the view. |
213 virtual int OnPerformDrop(const views::DropTargetEvent& event) = 0; | 213 virtual int OnPerformDrop(const views::DropTargetEvent& event) = 0; |
214 #endif | 214 #endif |
215 | 215 |
216 // Returns a string with any leading javascript schemas stripped from the | 216 // Returns a string with any leading javascript schemas stripped from the |
217 // input text. | 217 // input text. |
218 static string16 StripJavascriptSchemas(const string16& text); | 218 static string16 StripJavascriptSchemas(const string16& text); |
219 | 219 |
| 220 // Returns the current clipboard contents as a string that can be pasted in. |
| 221 // In addition to just getting CF_UNICODETEXT out, this can also extract URLs |
| 222 // from bookmarks on the clipboard. |
| 223 static string16 GetClipboardText(); |
| 224 |
220 virtual ~OmniboxView() {} | 225 virtual ~OmniboxView() {} |
221 }; | 226 }; |
222 | 227 |
223 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ | 228 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ |
OLD | NEW |