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

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

Issue 2024033006: Make ui::TextInputClient::IsEditCommandEnabled const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « ui/views/controls/textfield/textfield.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include <utility> 8 #include <utility>
9 9
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 1634
1635 range.set_start(range.start() - before); 1635 range.set_start(range.start() - before);
1636 range.set_end(range.end() + after); 1636 range.set_end(range.end() + after);
1637 gfx::Range text_range; 1637 gfx::Range text_range;
1638 if (GetTextRange(&text_range) && text_range.Contains(range)) 1638 if (GetTextRange(&text_range) && text_range.Contains(range))
1639 DeleteRange(range); 1639 DeleteRange(range);
1640 } 1640 }
1641 1641
1642 void Textfield::EnsureCaretInRect(const gfx::Rect& rect) {} 1642 void Textfield::EnsureCaretInRect(const gfx::Rect& rect) {}
1643 1643
1644 bool Textfield::IsEditCommandEnabled(int command_id) { 1644 bool Textfield::IsEditCommandEnabled(int command_id) const {
1645 return IsCommandIdEnabled(command_id); 1645 return IsCommandIdEnabled(command_id);
1646 } 1646 }
1647 1647
1648 void Textfield::SetEditCommandForNextKeyEvent(int command_id) { 1648 void Textfield::SetEditCommandForNextKeyEvent(int command_id) {
1649 DCHECK_EQ(kNoCommand, scheduled_edit_command_); 1649 DCHECK_EQ(kNoCommand, scheduled_edit_command_);
1650 scheduled_edit_command_ = command_id; 1650 scheduled_edit_command_ = command_id;
1651 } 1651 }
1652 1652
1653 //////////////////////////////////////////////////////////////////////////////// 1653 ////////////////////////////////////////////////////////////////////////////////
1654 // Textfield, protected: 1654 // Textfield, protected:
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 RequestFocus(); 1929 RequestFocus();
1930 model_->MoveCursorTo(mouse); 1930 model_->MoveCursorTo(mouse);
1931 if (!selection_clipboard_text.empty()) { 1931 if (!selection_clipboard_text.empty()) {
1932 model_->InsertText(selection_clipboard_text); 1932 model_->InsertText(selection_clipboard_text);
1933 UpdateAfterChange(true, true); 1933 UpdateAfterChange(true, true);
1934 } 1934 }
1935 OnAfterUserAction(); 1935 OnAfterUserAction();
1936 } 1936 }
1937 1937
1938 } // namespace views 1938 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/textfield.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698