Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: chrome/browser/ui/omnibox/omnibox_view.h

Issue 10824295: Rid the world of the last of views::Event types: TouchEvent, GestureEvent, MouseWheelEvent, ScrollE… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 22 matching lines...) Expand all
33 class WebContents; 33 class WebContents;
34 } 34 }
35 35
36 #if defined(TOOLKIT_VIEWS) 36 #if defined(TOOLKIT_VIEWS)
37 // TODO(beng): Move all views-related code to a views-specific sub-interface. 37 // TODO(beng): Move all views-related code to a views-specific sub-interface.
38 namespace gfx { 38 namespace gfx {
39 class Font; 39 class Font;
40 } 40 }
41 41
42 namespace views { 42 namespace views {
43 class View;
44 }
45
46 namespace ui {
43 class DropTargetEvent; 47 class DropTargetEvent;
44 class View;
45 } 48 }
46 #endif 49 #endif
47 50
48 class OmniboxView { 51 class OmniboxView {
49 public: 52 public:
50 virtual ~OmniboxView(); 53 virtual ~OmniboxView();
51 54
52 // Used by the automation system for getting at the model from the view. 55 // Used by the automation system for getting at the model from the view.
53 OmniboxEditModel* model() { return model_.get(); } 56 OmniboxEditModel* model() { return model_.get(); }
54 const OmniboxEditModel* model() const { return model_.get(); } 57 const OmniboxEditModel* model() const { return model_.get(); }
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 virtual bool IsImeComposing() const = 0; 200 virtual bool IsImeComposing() const = 0;
198 201
199 #if defined(TOOLKIT_VIEWS) 202 #if defined(TOOLKIT_VIEWS)
200 virtual int GetMaxEditWidth(int entry_width) const = 0; 203 virtual int GetMaxEditWidth(int entry_width) const = 0;
201 204
202 // Adds the autocomplete edit view to view hierarchy and 205 // Adds the autocomplete edit view to view hierarchy and
203 // returns the views::View of the edit view. 206 // returns the views::View of the edit view.
204 virtual views::View* AddToView(views::View* parent) = 0; 207 virtual views::View* AddToView(views::View* parent) = 0;
205 208
206 // Performs the drop of a drag and drop operation on the view. 209 // Performs the drop of a drag and drop operation on the view.
207 virtual int OnPerformDrop(const views::DropTargetEvent& event) = 0; 210 virtual int OnPerformDrop(const ui::DropTargetEvent& event) = 0;
208 211
209 // Returns the font. 212 // Returns the font.
210 virtual gfx::Font GetFont() = 0; 213 virtual gfx::Font GetFont() = 0;
211 214
212 // Returns the width in pixels needed to display the text from one character 215 // Returns the width in pixels needed to display the text from one character
213 // before the caret to the end of the string. 216 // before the caret to the end of the string.
214 virtual int WidthOfTextAfterCursor() = 0; 217 virtual int WidthOfTextAfterCursor() = 0;
215 #endif 218 #endif
216 219
217 // Returns a string with any leading javascript schemas stripped from the 220 // Returns a string with any leading javascript schemas stripped from the
(...skipping 30 matching lines...) Expand all
248 scoped_ptr<OmniboxEditModel> model_; 251 scoped_ptr<OmniboxEditModel> model_;
249 OmniboxEditController* controller_; 252 OmniboxEditController* controller_;
250 ToolbarModel* toolbar_model_; 253 ToolbarModel* toolbar_model_;
251 254
252 // The object that handles additional command functionality exposed on the 255 // The object that handles additional command functionality exposed on the
253 // edit, such as invoking the keyword editor. 256 // edit, such as invoking the keyword editor.
254 CommandUpdater* command_updater_; 257 CommandUpdater* command_updater_;
255 }; 258 };
256 259
257 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ 260 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_unittest.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698