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

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

Issue 9309111: Remove initial empty setting of base color for OmniBoxViewViews (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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 | « no previous file | 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 "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/property_bag.h" 7 #include "base/property_bag.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 textfield_->font(), this, model_.get(), location_bar_view_)); 215 textfield_->font(), this, model_.get(), location_bar_view_));
216 216
217 const int vertical_margin = !popup_window_mode_ ? 217 const int vertical_margin = !popup_window_mode_ ?
218 kAutocompleteVerticalMargin : kAutocompleteVerticalMarginInPopup; 218 kAutocompleteVerticalMargin : kAutocompleteVerticalMarginInPopup;
219 set_border(views::Border::CreateEmptyBorder(vertical_margin, 0, 219 set_border(views::Border::CreateEmptyBorder(vertical_margin, 0,
220 vertical_margin, 0)); 220 vertical_margin, 0));
221 #if defined(OS_CHROMEOS) 221 #if defined(OS_CHROMEOS)
222 chromeos::input_method::InputMethodManager::GetInstance()-> 222 chromeos::input_method::InputMethodManager::GetInstance()->
223 AddCandidateWindowObserver(this); 223 AddCandidateWindowObserver(this);
224 #endif 224 #endif
225
226 // Manually invoke SetBaseColor() because TOOLKIT_VIEWS doesn't observe
227 // themes.
228 SetBaseColor();
229 } 225 }
230 226
231 void OmniboxViewViews::SetBaseColor() { 227 void OmniboxViewViews::SetBaseColor() {
232 // TODO(oshima): Implement style change. 228 // TODO(oshima): Implement style change.
233 NOTIMPLEMENTED(); 229 NOTIMPLEMENTED();
234 } 230 }
oshima 2012/02/06 17:02:52 I looks like the color selection scheme has change
DaveMoore 2012/02/06 18:57:36 Done.
235 231
236 bool OmniboxViewViews::HandleAfterKeyEvent(const views::KeyEvent& event, 232 bool OmniboxViewViews::HandleAfterKeyEvent(const views::KeyEvent& event,
237 bool handled) { 233 bool handled) {
238 if (event.key_code() == ui::VKEY_RETURN) { 234 if (event.key_code() == ui::VKEY_RETURN) {
239 bool alt_held = event.IsAltDown(); 235 bool alt_held = event.IsAltDown();
240 model_->AcceptInput(alt_held ? NEW_FOREGROUND_TAB : CURRENT_TAB, false); 236 model_->AcceptInput(alt_held ? NEW_FOREGROUND_TAB : CURRENT_TAB, false);
241 handled = true; 237 handled = true;
242 } else if (!handled && event.key_code() == ui::VKEY_ESCAPE) { 238 } else if (!handled && event.key_code() == ui::VKEY_ESCAPE) {
243 // We can handle the Escape key if textfield did not handle it. 239 // We can handle the Escape key if textfield did not handle it.
244 // If it's not handled by us, then we need to propagate it up to the parent 240 // If it's not handled by us, then we need to propagate it up to the parent
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 OmniboxViewViews* omnibox_view = new OmniboxViewViews(controller, 849 OmniboxViewViews* omnibox_view = new OmniboxViewViews(controller,
854 toolbar_model, 850 toolbar_model,
855 profile, 851 profile,
856 command_updater, 852 command_updater,
857 popup_window_mode, 853 popup_window_mode,
858 location_bar); 854 location_bar);
859 omnibox_view->Init(); 855 omnibox_view->Init();
860 return omnibox_view; 856 return omnibox_view;
861 } 857 }
862 #endif 858 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698