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

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

Issue 2399333002: Revert of Delete pre-MD code from OmniboxResultView (Closed)
Patch Set: Created 4 years, 2 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
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 "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 // Add enough space on the top and bottom so it looks like there is the same 470 // Add enough space on the top and bottom so it looks like there is the same
471 // amount of space between the text and the popup border as there is in the 471 // amount of space between the text and the popup border as there is in the
472 // interior between each row of text. 472 // interior between each row of text.
473 return popup_height + GetLayoutInsets(OMNIBOX_DROPDOWN).height() + 473 return popup_height + GetLayoutInsets(OMNIBOX_DROPDOWN).height() +
474 g_top_shadow.Get().height() + g_bottom_shadow.Get().height(); 474 g_top_shadow.Get().height() + g_bottom_shadow.Get().height();
475 } 475 }
476 476
477 OmniboxResultView* OmniboxPopupContentsView::CreateResultView( 477 OmniboxResultView* OmniboxPopupContentsView::CreateResultView(
478 int model_index, 478 int model_index,
479 const gfx::FontList& font_list) { 479 const gfx::FontList& font_list) {
480 return new OmniboxResultView(this, model_index, font_list); 480 return new OmniboxResultView(this, model_index, location_bar_view_,
481 font_list);
481 } 482 }
482 483
483 //////////////////////////////////////////////////////////////////////////////// 484 ////////////////////////////////////////////////////////////////////////////////
484 // OmniboxPopupContentsView, views::View overrides, private: 485 // OmniboxPopupContentsView, views::View overrides, private:
485 486
486 const char* OmniboxPopupContentsView::GetClassName() const { 487 const char* OmniboxPopupContentsView::GetClassName() const {
487 return "OmniboxPopupContentsView"; 488 return "OmniboxPopupContentsView";
488 } 489 }
489 490
490 void OmniboxPopupContentsView::OnPaint(gfx::Canvas* canvas) { 491 void OmniboxPopupContentsView::OnPaint(gfx::Canvas* canvas) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 size_t index = GetIndexForPoint(event.location()); 562 size_t index = GetIndexForPoint(event.location());
562 if (!HasMatchAt(index)) 563 if (!HasMatchAt(index))
563 return; 564 return;
564 omnibox_view_->OpenMatch(model_->result().match_at(index), disposition, 565 omnibox_view_->OpenMatch(model_->result().match_at(index), disposition,
565 GURL(), base::string16(), index); 566 GURL(), base::string16(), index);
566 } 567 }
567 568
568 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) { 569 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) {
569 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i))); 570 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i)));
570 } 571 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/search/omnibox_result.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_result_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698