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

Unified Diff: ui/views/views_delegate.h

Issue 2119813002: views::Textfield: Implement yank editing command. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/views_delegate.h
diff --git a/ui/views/views_delegate.h b/ui/views/views_delegate.h
index 54b5c4383e8d39aaf32dfdc58856ff712925a194..11e45e82ba5ebf9970f611b3ba185e04b8725677 100644
--- a/ui/views/views_delegate.h
+++ b/ui/views/views_delegate.h
@@ -102,6 +102,14 @@ class VIEWS_EXPORT ViewsDelegate {
return native_widget_factory_;
}
+ const base::string16& kill_buffer() {
tapted 2016/07/20 06:32:21 nit: declare method const
karandeepb 2016/07/20 07:51:30 Done.
+ return kill_buffer_;
+ }
+
+ void set_kill_buffer(const base::string16& kill_buffer) {
tapted 2016/07/20 06:32:21 nit: swap these around and remove the blank line b
karandeepb 2016/07/20 07:51:30 Done.
+ kill_buffer_ = kill_buffer;
+ }
+
// Saves the position, size and "show" state for the window with the
// specified name.
virtual void SaveWindowPlacement(const Widget* widget,
@@ -205,6 +213,14 @@ class VIEWS_EXPORT ViewsDelegate {
NativeWidgetFactory native_widget_factory_;
+ // Buffer containing the text to be inserted on executing yank command for
+ // Views::Texfield. Member of ViewsDelegate since this needs to be persisted
tapted 2016/07/20 06:32:21 nit: Views -> views
karandeepb 2016/07/20 07:51:30 Done.
+ // across multiple textfield instances.
+ // On Mac, the size of the kill ring (no. of buffers) is controlled by
+ // NSTextKillRingSize, a text system default. However to keep things simple,
+ // the default kill ring size of 1 (i.e. a single buffer) is assumed.
+ base::string16 kill_buffer_;
+
DISALLOW_COPY_AND_ASSIGN(ViewsDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698