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

Unified Diff: views/controls/textfield/textfield_views_model.h

Issue 6004010: Implement clipboard features in views textfield. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Modified according to comments Created 9 years, 12 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: views/controls/textfield/textfield_views_model.h
diff --git a/views/controls/textfield/textfield_views_model.h b/views/controls/textfield/textfield_views_model.h
index 219a8c721617014cf9360b03163f873e11c9377f..c023c96c23d95f5296926c3b1f83f172b61b297f 100644
--- a/views/controls/textfield/textfield_views_model.h
+++ b/views/controls/textfield/textfield_views_model.h
@@ -8,6 +8,7 @@
#include <vector>
+#include "app/keyboard_codes.h"
rjkroege 2011/01/05 18:40:16 you can remove this now yes?
oshima 2011/01/05 18:50:30 should be. On 2011/01/05 18:40:16, rjkroege wrote
varunjain 2011/01/05 19:03:35 Done.
#include "base/string16.h"
#include "gfx/rect.h"
#include "third_party/skia/include/core/SkColor.h"
@@ -126,6 +127,17 @@ class TextfieldViewsModel {
return GetVisibleText(0U, text_.length());
}
+ // Cuts the currently selected text and puts it to clipboard. Returns true
+ // if text has changed after cutting.
+ bool Cut();
+
+ // Copies the currently selected text and puts it to clipboard.
+ void Copy();
+
+ // Pastes text from the clipboard at current cursor position. Returns true
+ // if text has changed after pasting.
+ bool Paste();
+
private:
friend class NativeTextfieldViews;

Powered by Google App Engine
This is Rietveld 408576698