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

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

Issue 262093014: Test that OmniboxViewViews has opaque background. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 fade_in_animation_.reset(new gfx::SlideAnimation(this)); 174 fade_in_animation_.reset(new gfx::SlideAnimation(this));
175 fade_in_animation_->SetTweenType(gfx::Tween::LINEAR); 175 fade_in_animation_->SetTweenType(gfx::Tween::LINEAR);
176 fade_in_animation_->SetSlideDuration(300); 176 fade_in_animation_->SetSlideDuration(300);
177 } 177 }
178 178
179 void OmniboxViewViews::FadeIn() { 179 void OmniboxViewViews::FadeIn() {
180 fade_in_animation_->Show(); 180 fade_in_animation_->Show();
181 } 181 }
182 182
183 gfx::RenderText* OmniboxViewViews::GetRenderTextForTesting() {
184 return GetRenderText();
185 }
186
183 //////////////////////////////////////////////////////////////////////////////// 187 ////////////////////////////////////////////////////////////////////////////////
184 // OmniboxViewViews, public OmniboxView implementation: 188 // OmniboxViewViews, public OmniboxView implementation:
185 189
186 void OmniboxViewViews::SaveStateToTab(content::WebContents* tab) { 190 void OmniboxViewViews::SaveStateToTab(content::WebContents* tab) {
187 DCHECK(tab); 191 DCHECK(tab);
188 192
189 // We don't want to keep the IME status, so force quit the current 193 // We don't want to keep the IME status, so force quit the current
190 // session here. It may affect the selection status, so order is 194 // session here. It may affect the selection status, so order is
191 // also important. 195 // also important.
192 if (IsIMEComposing()) { 196 if (IsIMEComposing()) {
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 menu_contents->InsertItemWithStringIdAt( 1045 menu_contents->InsertItemWithStringIdAt(
1042 select_all_position + 1, IDS_SHOW_URL, IDS_SHOW_URL); 1046 select_all_position + 1, IDS_SHOW_URL, IDS_SHOW_URL);
1043 } 1047 }
1044 1048
1045 // Minor note: We use IDC_ for command id here while the underlying textfield 1049 // Minor note: We use IDC_ for command id here while the underlying textfield
1046 // is using IDS_ for all its command ids. This is because views cannot depend 1050 // is using IDS_ for all its command ids. This is because views cannot depend
1047 // on IDC_ for now. 1051 // on IDC_ for now.
1048 menu_contents->AddItemWithStringId(IDC_EDIT_SEARCH_ENGINES, 1052 menu_contents->AddItemWithStringId(IDC_EDIT_SEARCH_ENGINES,
1049 IDS_EDIT_SEARCH_ENGINES); 1053 IDS_EDIT_SEARCH_ENGINES);
1050 } 1054 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698