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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_result_view.h

Issue 917333004: Answers in Suggest icon downloading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed some {} Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/omnibox/omnibox_result_view.h
diff --git a/chrome/browser/ui/views/omnibox/omnibox_result_view.h b/chrome/browser/ui/views/omnibox/omnibox_result_view.h
index 4ce5c993b479b5f75f10e3a0526c12e4f9688cae..e35d32797b3a3a9da718bb65692317460c2ef3ab 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.h
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/gtest_prod_util.h"
+#include "chrome/browser/bitmap_fetcher/bitmap_fetcher_service.h"
#include "components/omnibox/autocomplete_match.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/animation/animation_delegate.h"
@@ -82,7 +83,7 @@ class OmniboxResultView : public views::View,
gfx::RenderText* contents,
gfx::RenderText* description,
gfx::Canvas* canvas,
- int x) const;
+ int x);
// Draws given |render_text| on |canvas| at given location (|x|, |y|).
// |contents| indicates whether the |render_text| is for the match contents
@@ -121,6 +122,7 @@ class OmniboxResultView : public views::View,
// views::View:
const char* GetClassName() const override;
+ gfx::ImageSkia GetAnswerIcon();
gfx::ImageSkia GetIcon() const;
const gfx::ImageSkia* GetKeywordIcon() const;
@@ -153,6 +155,12 @@ class OmniboxResultView : public views::View,
static int default_icon_size_;
+ // If the answer has an icon, these control the fetching and updating
+ // of the icon.
+ BitmapFetcherService::RequestId request_id_;
Peter Kasting 2015/02/13 03:01:07 I would consider making the members here mutable a
+ GURL image_url_;
groby-ooo-7-16 2015/02/13 02:30:56 I don't think you need |image_url_|.
+ gfx::ImageSkia answer_image_;
+
// Default values cached here, may be overridden using the setters above.
int edge_item_padding_;
int item_padding_;

Powered by Google App Engine
This is Rietveld 408576698