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

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

Issue 2365263006: Delete pre-MD code from OmniboxResultView (Closed)
Patch Set: update references to constant (merge resolution) 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, location_bar_view_, 480 return new OmniboxResultView(this, model_index, font_list);
481 font_list);
482 } 481 }
483 482
484 //////////////////////////////////////////////////////////////////////////////// 483 ////////////////////////////////////////////////////////////////////////////////
485 // OmniboxPopupContentsView, views::View overrides, private: 484 // OmniboxPopupContentsView, views::View overrides, private:
486 485
487 const char* OmniboxPopupContentsView::GetClassName() const { 486 const char* OmniboxPopupContentsView::GetClassName() const {
488 return "OmniboxPopupContentsView"; 487 return "OmniboxPopupContentsView";
489 } 488 }
490 489
491 void OmniboxPopupContentsView::OnPaint(gfx::Canvas* canvas) { 490 void OmniboxPopupContentsView::OnPaint(gfx::Canvas* canvas) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 size_t index = GetIndexForPoint(event.location()); 561 size_t index = GetIndexForPoint(event.location());
563 if (!HasMatchAt(index)) 562 if (!HasMatchAt(index))
564 return; 563 return;
565 omnibox_view_->OpenMatch(model_->result().match_at(index), disposition, 564 omnibox_view_->OpenMatch(model_->result().match_at(index), disposition,
566 GURL(), base::string16(), index); 565 GURL(), base::string16(), index);
567 } 566 }
568 567
569 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) { 568 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) {
570 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i))); 569 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i)));
571 } 570 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698