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

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

Issue 2001433002: Update appearance of omnibox focus for MD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: share constant Created 4 years, 7 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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 } 566 }
567 567
568 void Textfield::SetAccessibleName(const base::string16& name) { 568 void Textfield::SetAccessibleName(const base::string16& name) {
569 accessible_name_ = name; 569 accessible_name_ = name;
570 } 570 }
571 571
572 void Textfield::ExecuteCommand(int command_id) { 572 void Textfield::ExecuteCommand(int command_id) {
573 ExecuteCommand(command_id, ui::EF_NONE); 573 ExecuteCommand(command_id, ui::EF_NONE);
574 } 574 }
575 575
576 void Textfield::SetFocusPainter(std::unique_ptr<Painter> focus_painter) {
577 focus_painter_ = std::move(focus_painter);
578 }
579
580 bool Textfield::HasTextBeingDragged() { 576 bool Textfield::HasTextBeingDragged() {
581 return initiating_drag_; 577 return initiating_drag_;
582 } 578 }
583 579
584 //////////////////////////////////////////////////////////////////////////////// 580 ////////////////////////////////////////////////////////////////////////////////
585 // Textfield, View overrides: 581 // Textfield, View overrides:
586 582
587 gfx::Insets Textfield::GetInsets() const { 583 gfx::Insets Textfield::GetInsets() const {
588 gfx::Insets insets = View::GetInsets(); 584 gfx::Insets insets = View::GetInsets();
589 insets += gfx::Insets(kTextPadding, kTextPadding, kTextPadding, kTextPadding); 585 insets += gfx::Insets(kTextPadding, kTextPadding, kTextPadding, kTextPadding);
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 RequestFocus(); 1925 RequestFocus();
1930 model_->MoveCursorTo(mouse); 1926 model_->MoveCursorTo(mouse);
1931 if (!selection_clipboard_text.empty()) { 1927 if (!selection_clipboard_text.empty()) {
1932 model_->InsertText(selection_clipboard_text); 1928 model_->InsertText(selection_clipboard_text);
1933 UpdateAfterChange(true, true); 1929 UpdateAfterChange(true, true);
1934 } 1930 }
1935 OnAfterUserAction(); 1931 OnAfterUserAction();
1936 } 1932 }
1937 1933
1938 } // namespace views 1934 } // 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