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

Side by Side Diff: chrome/browser/ui/views/autofill/decorated_textfield.cc

Issue 55243005: Implement learn more bubble on views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/views/autofill/decorated_textfield.h" 5 #include "chrome/browser/ui/views/autofill/decorated_textfield.h"
6 6
7 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" 7 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
8 #include "chrome/browser/ui/views/autofill/tooltip_icon.h" 8 #include "chrome/browser/ui/views/autofill/tooltip_icon.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/views/background.h" 10 #include "ui/views/background.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 return base::string16(); 114 return base::string16();
115 115
116 return views::Textfield::GetPlaceholderText(); 116 return views::Textfield::GetPlaceholderText();
117 } 117 }
118 118
119 const char* DecoratedTextfield::GetClassName() const { 119 const char* DecoratedTextfield::GetClassName() const {
120 return kViewClassName; 120 return kViewClassName;
121 } 121 }
122 122
123 views::View* DecoratedTextfield::GetEventHandlerForRect(const gfx::Rect& rect) { 123 views::View* DecoratedTextfield::GetEventHandlerForRect(const gfx::Rect& rect) {
124 views::View* handler = views::Textfield::GetEventHandlerForRect(rect);
125 if (handler->GetClassName() == TooltipIcon::kViewClassName)
126 return handler;
124 return native_wrapper_->GetView(); 127 return native_wrapper_->GetView();
125 } 128 }
126 129
127 void DecoratedTextfield::OnFocus() { 130 void DecoratedTextfield::OnFocus() {
128 border_->set_has_focus(true); 131 border_->set_has_focus(true);
129 views::Textfield::OnFocus(); 132 views::Textfield::OnFocus();
130 } 133 }
131 134
132 void DecoratedTextfield::OnBlur() { 135 void DecoratedTextfield::OnBlur() {
133 border_->set_has_focus(false); 136 border_->set_has_focus(false);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 icon_view_->GetPreferredSize().width() + 2 * kTextfieldIconPadding : 0; 176 icon_view_->GetPreferredSize().width() + 2 * kTextfieldIconPadding : 0;
174 177
175 bool is_rtl = base::i18n::IsRTL(); 178 bool is_rtl = base::i18n::IsRTL();
176 SetHorizontalMargins(is_rtl ? icon_space : 0, is_rtl ? 0 : icon_space); 179 SetHorizontalMargins(is_rtl ? icon_space : 0, is_rtl ? 0 : icon_space);
177 180
178 Layout(); 181 Layout();
179 SchedulePaint(); 182 SchedulePaint();
180 } 183 }
181 184
182 } // namespace autofill 185 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_dialog_views.cc ('k') | chrome/browser/ui/views/autofill/info_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698