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

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

Issue 11364053: make StackingClient dispatch to either ash or desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + disable prerender tests on win-aura Created 8 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 (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_popup_contents_view.h" 5 #include "chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h"
6 6
7 #include "chrome/browser/ui/omnibox/omnibox_view.h" 7 #include "chrome/browser/ui/omnibox/omnibox_view.h"
8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
9 #include "chrome/browser/ui/views/omnibox/omnibox_popup_non_view.h" 9 #include "chrome/browser/ui/views/omnibox/omnibox_popup_non_view.h"
10 #include "chrome/browser/ui/views/omnibox/omnibox_result_view.h" 10 #include "chrome/browser/ui/views/omnibox/omnibox_result_view.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 target_bounds_ = new_target_bounds; 208 target_bounds_ = new_target_bounds;
209 209
210 if (popup_ == NULL) { 210 if (popup_ == NULL) {
211 // If the popup is currently closed, we need to create it. 211 // If the popup is currently closed, we need to create it.
212 popup_ = (new AutocompletePopupWidget)->AsWeakPtr(); 212 popup_ = (new AutocompletePopupWidget)->AsWeakPtr();
213 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); 213 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
214 params.can_activate = false; 214 params.can_activate = false;
215 params.transparent = true; 215 params.transparent = true;
216 params.parent_widget = location_bar_->GetWidget(); 216 params.parent_widget = location_bar_->GetWidget();
217 params.bounds = GetPopupBounds(); 217 params.bounds = GetPopupBounds();
218 params.context = location_bar_->GetWidget()->GetNativeView();
218 popup_->Init(params); 219 popup_->Init(params);
219 #if defined(USE_ASH) 220 #if defined(USE_ASH)
220 ash::SetWindowVisibilityAnimationType( 221 ash::SetWindowVisibilityAnimationType(
221 popup_->GetNativeView(), 222 popup_->GetNativeView(),
222 ash::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL); 223 ash::WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL);
223 // Meanie-pants designers won't let us animate the appearance in 224 // Meanie-pants designers won't let us animate the appearance in
224 // production, but we will do it anyway for desktop-aura for the time being 225 // production, but we will do it anyway for desktop-aura for the time being
225 // as it lets usverify quickly that hotness is enabled. 226 // as it lets usverify quickly that hotness is enabled.
226 #if defined(OS_CHROMEOS) 227 #if defined(OS_CHROMEOS)
227 // No animation for autocomplete popup appearance. 228 // No animation for autocomplete popup appearance.
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 void OmniboxPopupContentsView::OpenSelectedLine( 554 void OmniboxPopupContentsView::OpenSelectedLine(
554 const ui::LocatedEvent& event, 555 const ui::LocatedEvent& event,
555 WindowOpenDisposition disposition) { 556 WindowOpenDisposition disposition) {
556 size_t index = GetIndexForPoint(event.location()); 557 size_t index = GetIndexForPoint(event.location());
557 OpenIndex(index, disposition); 558 OpenIndex(index, disposition);
558 } 559 }
559 560
560 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) { 561 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) {
561 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i))); 562 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i)));
562 } 563 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame.cc ('k') | chrome/browser/ui/views/status_bubble_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698