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

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

Issue 302293003: MacViews: Extend TextInputClient protocol with support for editing commands. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 "grit/ui_strings.h" 10 #include "grit/ui_strings.h"
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 } 1448 }
1449 1449
1450 void Textfield::EnsureCaretInRect(const gfx::Rect& rect) {} 1450 void Textfield::EnsureCaretInRect(const gfx::Rect& rect) {}
1451 1451
1452 void Textfield::OnCandidateWindowShown() {} 1452 void Textfield::OnCandidateWindowShown() {}
1453 1453
1454 void Textfield::OnCandidateWindowUpdated() {} 1454 void Textfield::OnCandidateWindowUpdated() {}
1455 1455
1456 void Textfield::OnCandidateWindowHidden() {} 1456 void Textfield::OnCandidateWindowHidden() {}
1457 1457
1458 bool Textfield::IsEditingCommandEnabled(int command_id) {
1459 return IsCommandIdEnabled(command_id);
1460 }
1461
1462 void Textfield::ExecuteEditingCommand(int command_id) {
1463 ExecuteCommand(command_id);
1464 }
1465
1458 //////////////////////////////////////////////////////////////////////////////// 1466 ////////////////////////////////////////////////////////////////////////////////
1459 // Textfield, protected: 1467 // Textfield, protected:
1460 1468
1461 gfx::RenderText* Textfield::GetRenderText() const { 1469 gfx::RenderText* Textfield::GetRenderText() const {
1462 return model_->render_text(); 1470 return model_->render_text();
1463 } 1471 }
1464 1472
1465 base::string16 Textfield::GetSelectionClipboardText() const { 1473 base::string16 Textfield::GetSelectionClipboardText() const {
1466 base::string16 selection_clipboard_text; 1474 base::string16 selection_clipboard_text;
1467 ui::Clipboard::GetForCurrentThread()->ReadText( 1475 ui::Clipboard::GetForCurrentThread()->ReadText(
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 const size_t length = selection_clipboard_text.length(); 1716 const size_t length = selection_clipboard_text.length();
1709 range = gfx::Range(range.start() + length, range.end() + length); 1717 range = gfx::Range(range.start() + length, range.end() + length);
1710 } 1718 }
1711 model_->MoveCursorTo(gfx::SelectionModel(range, affinity)); 1719 model_->MoveCursorTo(gfx::SelectionModel(range, affinity));
1712 UpdateAfterChange(true, true); 1720 UpdateAfterChange(true, true);
1713 OnAfterUserAction(); 1721 OnAfterUserAction();
1714 } 1722 }
1715 } 1723 }
1716 1724
1717 } // namespace views 1725 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698