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

Unified Diff: views/controls/textfield/textfield.cc

Issue 6628037: views: Moves TextfieldController/TextRange into their own headers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 years, 9 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
« no previous file with comments | « views/controls/textfield/textfield.h ('k') | views/controls/textfield/textfield_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/textfield.cc
diff --git a/views/controls/textfield/textfield.cc b/views/controls/textfield/textfield.cc
index 8c1003bd55e1cca2e6ca137f9706271f62861a9d..b5ab72a0d396dcd3612a2645997fc03aae8b6232 100644
--- a/views/controls/textfield/textfield.cc
+++ b/views/controls/textfield/textfield.cc
@@ -16,6 +16,8 @@
#include "ui/gfx/insets.h"
#include "views/controls/native/native_view_host.h"
#include "views/controls/textfield/native_textfield_wrapper.h"
+#include "views/controls/textfield/text_range.h"
+#include "views/controls/textfield/textfield_controller.h"
#include "views/widget/widget.h"
#if defined(OS_LINUX)
@@ -24,8 +26,8 @@
#include "base/win/win_util.h"
// TODO(beng): this should be removed when the OS_WIN hack from
// ViewHierarchyChanged is removed.
-#include "views/controls/textfield/native_textfield_win.h"
#include "views/controls/textfield/native_textfield_views.h"
+#include "views/controls/textfield/native_textfield_win.h"
#include "views/events/event_utils_win.h"
#endif
@@ -35,27 +37,6 @@ namespace views {
const char Textfield::kViewClassName[] = "views/Textfield";
/////////////////////////////////////////////////////////////////////////////
-// TextRange
-
-TextRange::TextRange(size_t start, size_t end)
- : start_(start),
- end_(end) {
-}
-
-size_t TextRange::GetMin() const {
- return std::min(start_, end_);
-}
-
-size_t TextRange::GetMax() const {
- return std::max(start_, end_);
-}
-
-void TextRange::SetRange(size_t start, size_t end) {
- start_ = start;
- end_ = end;
-}
-
-/////////////////////////////////////////////////////////////////////////////
// Textfield
Textfield::Textfield()
@@ -97,11 +78,11 @@ Textfield::Textfield(StyleFlags style)
Textfield::~Textfield() {
}
-void Textfield::SetController(Controller* controller) {
+void Textfield::SetController(TextfieldController* controller) {
controller_ = controller;
}
-Textfield::Controller* Textfield::GetController() const {
+TextfieldController* Textfield::GetController() const {
return controller_;
}
« no previous file with comments | « views/controls/textfield/textfield.h ('k') | views/controls/textfield/textfield_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698