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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit_view_views.h

Issue 6462009: Allow dragging and dropping of URLs to any portion of the toolbar view.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/scoped_ptr.h" 12 #include "base/scoped_ptr.h"
13 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" 13 #include "chrome/browser/autocomplete/autocomplete_edit_view.h"
14 #include "chrome/browser/ui/toolbar/toolbar_model.h" 14 #include "chrome/browser/ui/toolbar/toolbar_model.h"
15 #include "chrome/common/notification_observer.h" 15 #include "chrome/common/notification_observer.h"
16 #include "chrome/common/page_transition_types.h" 16 #include "chrome/common/page_transition_types.h"
17 #include "views/controls/textfield/textfield.h" 17 #include "views/controls/textfield/textfield.h"
18 #include "views/view.h" 18 #include "views/view.h"
19 #include "webkit/glue/window_open_disposition.h" 19 #include "webkit/glue/window_open_disposition.h"
20 20
21 class AutocompleteEditController; 21 class AutocompleteEditController;
22 class AutocompleteEditModel; 22 class AutocompleteEditModel;
23 class AutocompletePopupView; 23 class AutocompletePopupView;
24 class Profile; 24 class Profile;
25 class TabContents; 25 class TabContents;
26 26
27 // Views-implementation of AutocompleteEditView. This is based on 27 // Views-implementation of AutocompleteEditView. This is based on
28 // gtk implementation. The following features are not yet supported. 28 // gtk implementation. The following features are not yet supported.
29 // 29 //
30 // IME supoprt. 30 // IME support.
31 // LTR support. 31 // LTR support.
32 // Selection behavior. 32 // Selection behavior.
33 // Cut,copy and paste behavior. 33 // Cut,copy and paste behavior.
34 // Drag and drop behavior.
34 // URL styles (strikestrough insecure scheme, emphasize host). 35 // URL styles (strikestrough insecure scheme, emphasize host).
35 // Custom context menu for omnibox. 36 // Custom context menu for omnibox.
36 // Instant. 37 // Instant.
37 class AutocompleteEditViewViews : public views::View, 38 class AutocompleteEditViewViews : public views::View,
38 public AutocompleteEditView, 39 public AutocompleteEditView,
39 public NotificationObserver, 40 public NotificationObserver,
40 public views::Textfield::Controller { 41 public views::Textfield::Controller {
41 public: 42 public:
42 AutocompleteEditViewViews(AutocompleteEditController* controller, 43 AutocompleteEditViewViews(AutocompleteEditController* controller,
43 ToolbarModel* toolbar_model, 44 ToolbarModel* toolbar_model,
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 virtual void OnRevertTemporaryText(); 110 virtual void OnRevertTemporaryText();
110 virtual void OnBeforePossibleChange(); 111 virtual void OnBeforePossibleChange();
111 virtual bool OnAfterPossibleChange(); 112 virtual bool OnAfterPossibleChange();
112 virtual gfx::NativeView GetNativeView() const; 113 virtual gfx::NativeView GetNativeView() const;
113 virtual CommandUpdater* GetCommandUpdater(); 114 virtual CommandUpdater* GetCommandUpdater();
114 virtual void SetInstantSuggestion(const string16& input); 115 virtual void SetInstantSuggestion(const string16& input);
115 virtual string16 GetInstantSuggestion() const; 116 virtual string16 GetInstantSuggestion() const;
116 virtual int TextWidth() const; 117 virtual int TextWidth() const;
117 virtual bool IsImeComposing() const; 118 virtual bool IsImeComposing() const;
118 virtual views::View* AddToView(views::View* parent); 119 virtual views::View* AddToView(views::View* parent);
120 virtual int OnPerformDrop(const views::DropTargetEvent& event);
119 121
120 // Overridden from NotificationObserver: 122 // Overridden from NotificationObserver:
121 virtual void Observe(NotificationType type, 123 virtual void Observe(NotificationType type,
122 const NotificationSource& source, 124 const NotificationSource& source,
123 const NotificationDetails& details); 125 const NotificationDetails& details);
124 126
125 // Overridden from Textfield::Controller 127 // Overridden from Textfield::Controller
126 virtual void ContentsChanged(views::Textfield* sender, 128 virtual void ContentsChanged(views::Textfield* sender,
127 const string16& new_contents); 129 const string16& new_contents);
128 virtual bool HandleKeyEvent(views::Textfield* sender, 130 virtual bool HandleKeyEvent(views::Textfield* sender,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // This flag should be set for changes directly caused by a key press event, 198 // This flag should be set for changes directly caused by a key press event,
197 // including changes to content text, selection range and preedit string. 199 // including changes to content text, selection range and preedit string.
198 // Changes caused by function calls like SetUserText() should not affect this 200 // Changes caused by function calls like SetUserText() should not affect this
199 // flag. 201 // flag.
200 bool content_maybe_changed_by_key_press_; 202 bool content_maybe_changed_by_key_press_;
201 203
202 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewViews); 204 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewViews);
203 }; 205 };
204 206
205 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_ 207 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_VIEWS_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc ('k') | chrome/browser/autocomplete/autocomplete_edit_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698