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

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

Issue 196063002: Move wm/core to wm namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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_popup_contents_view.h" 5 #include "chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/browser/search/search.h" 9 #include "chrome/browser/search/search.h"
10 #include "chrome/browser/themes/theme_properties.h" 10 #include "chrome/browser/themes/theme_properties.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 params.context = popup_parent; 216 params.context = popup_parent;
217 popup_->Init(params); 217 popup_->Init(params);
218 // Third-party software such as DigitalPersona identity verification can 218 // Third-party software such as DigitalPersona identity verification can
219 // hook the underlying window creation methods and use SendMessage to 219 // hook the underlying window creation methods and use SendMessage to
220 // synchronously change focus/activation, resulting in the popup being 220 // synchronously change focus/activation, resulting in the popup being
221 // destroyed by the time control returns here. Bail out in this case to 221 // destroyed by the time control returns here. Bail out in this case to
222 // avoid a NULL dereference. 222 // avoid a NULL dereference.
223 if (!popup_.get()) 223 if (!popup_.get())
224 return; 224 return;
225 #if defined(USE_AURA) 225 #if defined(USE_AURA)
226 views::corewm::SetWindowVisibilityAnimationTransition( 226 wm::SetWindowVisibilityAnimationTransition(
227 popup_->GetNativeView(), views::corewm::ANIMATE_NONE); 227 popup_->GetNativeView(), wm::ANIMATE_NONE);
228 #endif 228 #endif
229 popup_->SetContentsView(this); 229 popup_->SetContentsView(this);
230 popup_->StackAbove(omnibox_view_->GetRelativeWindowForPopup()); 230 popup_->StackAbove(omnibox_view_->GetRelativeWindowForPopup());
231 if (!popup_.get()) { 231 if (!popup_.get()) {
232 // For some IMEs GetRelativeWindowForPopup triggers the omnibox to lose 232 // For some IMEs GetRelativeWindowForPopup triggers the omnibox to lose
233 // focus, thereby closing (and destroying) the popup. 233 // focus, thereby closing (and destroying) the popup.
234 // TODO(sky): this won't be needed once we close the omnibox on input 234 // TODO(sky): this won't be needed once we close the omnibox on input
235 // window showing. 235 // window showing.
236 return; 236 return;
237 } 237 }
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 size_t index = GetIndexForPoint(event.location()); 504 size_t index = GetIndexForPoint(event.location());
505 if (!HasMatchAt(index)) 505 if (!HasMatchAt(index))
506 return; 506 return;
507 omnibox_view_->OpenMatch(model_->result().match_at(index), disposition, 507 omnibox_view_->OpenMatch(model_->result().match_at(index), disposition,
508 GURL(), base::string16(), index); 508 GURL(), base::string16(), index);
509 } 509 }
510 510
511 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) { 511 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) {
512 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i))); 512 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i)));
513 } 513 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698