Chromium Code Reviews| Index: ui/views/views_delegate.h |
| diff --git a/ui/views/views_delegate.h b/ui/views/views_delegate.h |
| index 54b5c4383e8d39aaf32dfdc58856ff712925a194..f83b1339f8edd1bcc543c31491f89413f4fcdbf8 100644 |
| --- a/ui/views/views_delegate.h |
| +++ b/ui/views/views_delegate.h |
| @@ -102,6 +102,12 @@ class VIEWS_EXPORT ViewsDelegate { |
| return native_widget_factory_; |
| } |
| + // Access the text buffer used to implement the "Yank" text edit command. |
| + void set_kill_buffer(const base::string16& kill_buffer) { |
|
sky
2016/07/20 15:45:57
Is there a reason this needs to be on ViewsDelegat
karandeepb
2016/07/21 00:44:58
The cpp style guide forbids static storage duratio
tapted
2016/07/21 01:08:23
this came up in review earlier at https://coderevi
|
| + kill_buffer_ = kill_buffer; |
| + } |
| + const base::string16& kill_buffer() const { return kill_buffer_; } |
| + |
| // Saves the position, size and "show" state for the window with the |
| // specified name. |
| virtual void SaveWindowPlacement(const Widget* widget, |
| @@ -205,6 +211,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 |
| + // 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); |
| }; |