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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h

Issue 1841813002: Update AutocompleteTextFieldEditor to use non-deprecated dragging APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from avi. Created 4 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_
6 #define CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ 6 #define CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 27 matching lines...) Expand all
38 // Called when the control-key state changes while the field is 38 // Called when the control-key state changes while the field is
39 // first responder. 39 // first responder.
40 virtual void OnControlKeyChanged(bool pressed) = 0; 40 virtual void OnControlKeyChanged(bool pressed) = 0;
41 41
42 // Called when the user pastes into the field. 42 // Called when the user pastes into the field.
43 virtual void OnPaste() = 0; 43 virtual void OnPaste() = 0;
44 44
45 // Return |true| if there is a selection to copy. 45 // Return |true| if there is a selection to copy.
46 virtual bool CanCopy() = 0; 46 virtual bool CanCopy() = 0;
47 47
48 // Clears the |pboard| and adds the field's current selection. 48 // Creates a pasteboard item from the field's current selection.
49 // Called when the user does a copy or drag. 49 virtual base::scoped_nsobject<NSPasteboardItem> CreatePasteboardItem() = 0;
50
51 // Copies the pasteboard item returned from |CreatePasteboardItem()| to
52 // |pboard|.
50 virtual void CopyToPasteboard(NSPasteboard* pboard) = 0; 53 virtual void CopyToPasteboard(NSPasteboard* pboard) = 0;
51 54
52 // Returns true if the Show URL option should be available. 55 // Returns true if the Show URL option should be available.
53 virtual bool ShouldEnableShowURL() = 0; 56 virtual bool ShouldEnableShowURL() = 0;
54 57
55 // Shows the underlying URL. See OmniboxView::ShowURL(). 58 // Shows the underlying URL. See OmniboxView::ShowURL().
56 virtual void ShowURL() = 0; 59 virtual void ShowURL() = 0;
57 60
58 // Returns true if the current clipboard text supports paste and go 61 // Returns true if the current clipboard text supports paste and go
59 // (or paste and search). 62 // (or paste and search).
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // Draw gray text suggestion in |controlView|. 192 // Draw gray text suggestion in |controlView|.
190 void DrawGrayTextAutocompletion(NSAttributedString* mainText, 193 void DrawGrayTextAutocompletion(NSAttributedString* mainText,
191 NSString* suggestText, 194 NSString* suggestText,
192 NSColor* suggestColor, 195 NSColor* suggestColor,
193 NSView* controlView, 196 NSView* controlView,
194 NSRect frame); 197 NSRect frame);
195 198
196 } // namespace autocomplete_text_field 199 } // namespace autocomplete_text_field
197 200
198 #endif // CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_ 201 #endif // CHROME_BROWSER_UI_COCOA_AUTOCOMPLETE_TEXT_FIELD_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698