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

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

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 11 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
« no previous file with comments | « ui/views/controls/styled_label_unittest.cc ('k') | ui/views/corewm/tooltip_aura.cc » ('j') | 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 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 placeholder_text_color_(kDefaultPlaceholderTextColor), 83 placeholder_text_color_(kDefaultPlaceholderTextColor),
84 text_input_type_(ui::TEXT_INPUT_TYPE_TEXT), 84 text_input_type_(ui::TEXT_INPUT_TYPE_TEXT),
85 skip_input_method_cancel_composition_(false), 85 skip_input_method_cancel_composition_(false),
86 cursor_visible_(false), 86 cursor_visible_(false),
87 drop_cursor_visible_(false), 87 drop_cursor_visible_(false),
88 initiating_drag_(false), 88 initiating_drag_(false),
89 aggregated_clicks_(0), 89 aggregated_clicks_(0),
90 weak_ptr_factory_(this) { 90 weak_ptr_factory_(this) {
91 set_context_menu_controller(this); 91 set_context_menu_controller(this);
92 set_drag_controller(this); 92 set_drag_controller(this);
93 set_border(new FocusableBorder()); 93 SetBorder(scoped_ptr<Border>(new FocusableBorder()));
94 SetFocusable(true); 94 SetFocusable(true);
95 95
96 if (ViewsDelegate::views_delegate) { 96 if (ViewsDelegate::views_delegate) {
97 password_reveal_duration_ = ViewsDelegate::views_delegate-> 97 password_reveal_duration_ = ViewsDelegate::views_delegate->
98 GetDefaultTextfieldObscuredRevealDuration(); 98 GetDefaultTextfieldObscuredRevealDuration();
99 } 99 }
100 100
101 if (NativeViewHost::kRenderNativeControlFocus) 101 if (NativeViewHost::kRenderNativeControlFocus)
102 focus_painter_ = Painter::CreateDashedFocusPainter(); 102 focus_painter_ = Painter::CreateDashedFocusPainter();
103 } 103 }
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 const size_t length = selection_clipboard_text.length(); 1491 const size_t length = selection_clipboard_text.length();
1492 range = gfx::Range(range.start() + length, range.end() + length); 1492 range = gfx::Range(range.start() + length, range.end() + length);
1493 } 1493 }
1494 model_->MoveCursorTo(gfx::SelectionModel(range, affinity)); 1494 model_->MoveCursorTo(gfx::SelectionModel(range, affinity));
1495 UpdateAfterChange(true, true); 1495 UpdateAfterChange(true, true);
1496 OnAfterUserAction(); 1496 OnAfterUserAction();
1497 } 1497 }
1498 } 1498 }
1499 1499
1500 } // namespace views 1500 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/styled_label_unittest.cc ('k') | ui/views/corewm/tooltip_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698