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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 138363004: Views Textfield fixes and cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and rebase. 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
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 "chrome/browser/ui/views/omnibox/omnibox_view_views.h" 5 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 // Explicitly teardown members which have a reference to us. Just to be safe 156 // Explicitly teardown members which have a reference to us. Just to be safe
157 // we want them to be destroyed before destroying any other internal state. 157 // we want them to be destroyed before destroying any other internal state.
158 popup_view_.reset(); 158 popup_view_.reset();
159 } 159 }
160 160
161 //////////////////////////////////////////////////////////////////////////////// 161 ////////////////////////////////////////////////////////////////////////////////
162 // OmniboxViewViews public: 162 // OmniboxViewViews public:
163 163
164 void OmniboxViewViews::Init() { 164 void OmniboxViewViews::Init() {
165 SetController(this); 165 set_controller(this);
166 SetTextInputType(DetermineTextInputType()); 166 SetTextInputType(DetermineTextInputType());
167 SetBackgroundColor(location_bar_view_->GetColor( 167 SetBackgroundColor(location_bar_view_->GetColor(
168 ToolbarModel::NONE, LocationBarView::BACKGROUND)); 168 ToolbarModel::NONE, LocationBarView::BACKGROUND));
169 169
170 if (popup_window_mode_) 170 if (popup_window_mode_)
171 SetReadOnly(true); 171 SetReadOnly(true);
172 172
173 if (chrome::ShouldDisplayOriginChip()) 173 if (chrome::ShouldDisplayOriginChip())
174 set_placeholder_text(l10n_util::GetStringUTF16(IDS_OMNIBOX_EMPTY_HINT)); 174 set_placeholder_text(l10n_util::GetStringUTF16(IDS_OMNIBOX_EMPTY_HINT));
175 175
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 const base::string16 text(GetClipboardText()); 976 const base::string16 text(GetClipboardText());
977 if (!text.empty()) { 977 if (!text.empty()) {
978 // Record this paste, so we can do different behavior. 978 // Record this paste, so we can do different behavior.
979 model()->OnPaste(); 979 model()->OnPaste();
980 // Force a Paste operation to trigger the text_changed code in 980 // Force a Paste operation to trigger the text_changed code in
981 // OnAfterPossibleChange(), even if identical contents are pasted. 981 // OnAfterPossibleChange(), even if identical contents are pasted.
982 text_before_change_.clear(); 982 text_before_change_.clear();
983 InsertOrReplaceText(text); 983 InsertOrReplaceText(text);
984 } 984 }
985 } 985 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/login_view.cc ('k') | chrome/browser/ui/views/password_generation_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698