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

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

Issue 14270006: linux_aura: Use the correct tinted icons when in gtk+ theme mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 "chrome/browser/search/search.h" 7 #include "chrome/browser/search/search.h"
8 #include "chrome/browser/ui/omnibox/omnibox_popup_non_view.h" 8 #include "chrome/browser/ui/omnibox/omnibox_popup_non_view.h"
9 #include "chrome/browser/ui/omnibox/omnibox_view.h" 9 #include "chrome/browser/ui/omnibox/omnibox_view.h"
10 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 10 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 int popup_height = 0; 380 int popup_height = 0;
381 for (size_t i = 0; i < model_->result().size(); ++i) 381 for (size_t i = 0; i < model_->result().size(); ++i)
382 popup_height += child_at(i)->GetPreferredSize().height(); 382 popup_height += child_at(i)->GetPreferredSize().height();
383 return popup_height; 383 return popup_height;
384 } 384 }
385 385
386 OmniboxResultView* OmniboxPopupContentsView::CreateResultView( 386 OmniboxResultView* OmniboxPopupContentsView::CreateResultView(
387 OmniboxResultViewModel* model, 387 OmniboxResultViewModel* model,
388 int model_index, 388 int model_index,
389 const gfx::Font& font) { 389 const gfx::Font& font) {
390 return new OmniboxResultView(model, model_index, font); 390 return new OmniboxResultView(model, model_index, location_bar_, font);
391 } 391 }
392 392
393 //////////////////////////////////////////////////////////////////////////////// 393 ////////////////////////////////////////////////////////////////////////////////
394 // OmniboxPopupContentsView, views::View overrides, protected: 394 // OmniboxPopupContentsView, views::View overrides, protected:
395 395
396 void OmniboxPopupContentsView::OnPaint(gfx::Canvas* canvas) { 396 void OmniboxPopupContentsView::OnPaint(gfx::Canvas* canvas) {
397 gfx::Path path; 397 gfx::Path path;
398 MakeContentsPath(&path, GetContentsBounds()); 398 MakeContentsPath(&path, GetContentsBounds());
399 canvas->Save(); 399 canvas->Save();
400 canvas->sk_canvas()->clipPath(path, 400 canvas->sk_canvas()->clipPath(path,
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 void OmniboxPopupContentsView::OpenSelectedLine( 540 void OmniboxPopupContentsView::OpenSelectedLine(
541 const ui::LocatedEvent& event, 541 const ui::LocatedEvent& event,
542 WindowOpenDisposition disposition) { 542 WindowOpenDisposition disposition) {
543 size_t index = GetIndexForPoint(event.location()); 543 size_t index = GetIndexForPoint(event.location());
544 OpenIndex(index, disposition); 544 OpenIndex(index, disposition);
545 } 545 }
546 546
547 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) { 547 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) {
548 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i))); 548 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i)));
549 } 549 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h ('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