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

Side by Side Diff: ui/views/controls/textfield/textfield.cc

Issue 798683003: Rename old Aura TouchSelectionController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor fixes Created 6 years 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
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 #include "ui/views/controls/textfield/textfield.h" 5 #include "ui/views/controls/textfield/textfield.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "ui/accessibility/ax_view_state.h" 10 #include "ui/accessibility/ax_view_state.h"
(...skipping 1817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1828 weak_ptr_factory_.GetWeakPtr(), -1)); 1828 weak_ptr_factory_.GetWeakPtr(), -1));
1829 } 1829 }
1830 } 1830 }
1831 1831
1832 void Textfield::CreateTouchSelectionControllerAndNotifyIt() { 1832 void Textfield::CreateTouchSelectionControllerAndNotifyIt() {
1833 if (!HasFocus()) 1833 if (!HasFocus())
1834 return; 1834 return;
1835 1835
1836 if (!touch_selection_controller_) { 1836 if (!touch_selection_controller_) {
1837 touch_selection_controller_.reset( 1837 touch_selection_controller_.reset(
1838 ui::TouchSelectionController::create(this)); 1838 ui::TouchEditingControllerDeprecated::Create(this));
1839 } 1839 }
1840 if (touch_selection_controller_) 1840 if (touch_selection_controller_)
1841 touch_selection_controller_->SelectionChanged(); 1841 touch_selection_controller_->SelectionChanged();
1842 } 1842 }
1843 1843
1844 void Textfield::UpdateSelectionClipboard() const { 1844 void Textfield::UpdateSelectionClipboard() const {
1845 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 1845 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
1846 if (performing_user_action_ && HasSelection()) { 1846 if (performing_user_action_ && HasSelection()) {
1847 ui::ScopedClipboardWriter( 1847 ui::ScopedClipboardWriter(
1848 ui::CLIPBOARD_TYPE_SELECTION).WriteText(GetSelectedText()); 1848 ui::CLIPBOARD_TYPE_SELECTION).WriteText(GetSelectedText());
(...skipping 20 matching lines...) Expand all
1869 const size_t length = selection_clipboard_text.length(); 1869 const size_t length = selection_clipboard_text.length();
1870 range = gfx::Range(range.start() + length, range.end() + length); 1870 range = gfx::Range(range.start() + length, range.end() + length);
1871 } 1871 }
1872 model_->MoveCursorTo(gfx::SelectionModel(range, affinity)); 1872 model_->MoveCursorTo(gfx::SelectionModel(range, affinity));
1873 UpdateAfterChange(true, true); 1873 UpdateAfterChange(true, true);
1874 OnAfterUserAction(); 1874 OnAfterUserAction();
1875 } 1875 }
1876 } 1876 }
1877 1877
1878 } // namespace views 1878 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/textfield.h ('k') | ui/views/controls/textfield/textfield_test_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698