OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 AutocompleteEditView. Each toolkit | 5 // This file defines the interface class AutocompleteEditView. Each toolkit |
6 // will implement the edit view differently, so that code is inherently | 6 // will implement the edit view differently, so that code is inherently |
7 // platform specific. However, the AutocompleteEditModel needs to do some | 7 // platform specific. However, the AutocompleteEditModel needs to do some |
8 // communication with the view. Since the model is shared between platforms, | 8 // communication with the view. Since the model is shared between platforms, |
9 // we need to define an interface that all view implementations will share. | 9 // we need to define an interface that all view implementations will share. |
10 | 10 |
11 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_H_ | 11 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_H_ |
12 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_H_ | 12 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_H_ |
13 #pragma once | 13 #pragma once |
14 | 14 |
15 #include <string> | 15 #include <string> |
16 | 16 |
17 #include "base/string16.h" | 17 #include "base/string16.h" |
18 #include "chrome/common/page_transition_types.h" | 18 #include "chrome/common/page_transition_types.h" |
19 #include "ui/gfx/native_widget_types.h" | 19 #include "ui/gfx/native_widget_types.h" |
20 #include "webkit/glue/window_open_disposition.h" | 20 #include "webkit/glue/window_open_disposition.h" |
21 | 21 |
22 class AutocompleteEditModel; | 22 class AutocompleteEditModel; |
23 class CommandUpdater; | 23 class CommandUpdater; |
24 class GURL; | 24 class GURL; |
25 class TabContents; | 25 class TabContents; |
26 | 26 |
27 #if defined(TOOLKIT_VIEWS) | 27 #if defined(TOOLKIT_VIEWS) |
28 namespace views { | 28 namespace views { |
| 29 class DropTargetEvent; |
29 class View; | 30 class View; |
30 } // namespace views | 31 } // namespace views |
31 #endif | 32 #endif |
32 | 33 |
33 class AutocompleteEditView { | 34 class AutocompleteEditView { |
34 public: | 35 public: |
35 // Used by the automation system for getting at the model from the view. | 36 // Used by the automation system for getting at the model from the view. |
36 virtual AutocompleteEditModel* model() = 0; | 37 virtual AutocompleteEditModel* model() = 0; |
37 virtual const AutocompleteEditModel* model() const = 0; | 38 virtual const AutocompleteEditModel* model() const = 0; |
38 | 39 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // returned value includes margins. | 169 // returned value includes margins. |
169 virtual int TextWidth() const = 0; | 170 virtual int TextWidth() const = 0; |
170 | 171 |
171 // Returns true if the user is composing something in an IME. | 172 // Returns true if the user is composing something in an IME. |
172 virtual bool IsImeComposing() const = 0; | 173 virtual bool IsImeComposing() const = 0; |
173 | 174 |
174 #if defined(TOOLKIT_VIEWS) | 175 #if defined(TOOLKIT_VIEWS) |
175 // Adds the autocomplete edit view to view hierarchy and | 176 // Adds the autocomplete edit view to view hierarchy and |
176 // returns the views::View of the edit view. | 177 // returns the views::View of the edit view. |
177 virtual views::View* AddToView(views::View* parent) = 0; | 178 virtual views::View* AddToView(views::View* parent) = 0; |
| 179 |
| 180 // Performs the drop of a drag and drop operation on the view. |
| 181 virtual int OnPerformDrop(const views::DropTargetEvent& event) = 0; |
178 #endif | 182 #endif |
179 | 183 |
180 virtual ~AutocompleteEditView() {} | 184 virtual ~AutocompleteEditView() {} |
181 }; | 185 }; |
182 | 186 |
183 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_H_ | 187 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_H_ |
OLD | NEW |