| 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..407203b18f399e2197feeae720f8537bddcd744c 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"
|
| @@ -75,6 +76,12 @@ class OmniboxResultView : public views::View,
|
| // Returns the display width required for the match contents.
|
| int GetMatchContentsWidth() const;
|
|
|
| + void SetAnswerImage(gfx::ImageSkia image);
|
| +
|
| + base::WeakPtr<OmniboxResultView> GetWeakPtr() {
|
| + return weak_ptr_factory_.GetWeakPtr();
|
| + }
|
| +
|
| protected:
|
| // Paints the given |match| using the RenderText instances |contents| and
|
| // |description| at offset |x| in the bounds of this view.
|
| @@ -121,6 +128,7 @@ class OmniboxResultView : public views::View,
|
| // views::View:
|
| const char* GetClassName() const override;
|
|
|
| + void GetAnswerIcon();
|
| gfx::ImageSkia GetIcon() const;
|
| const gfx::ImageSkia* GetKeywordIcon() const;
|
|
|
| @@ -151,8 +159,16 @@ class OmniboxResultView : public views::View,
|
| bool is_ui_rtl,
|
| bool is_match_contents_rtl) const;
|
|
|
| + bool HasImageService();
|
| +
|
| static int default_icon_size_;
|
|
|
| + // If the answer has an icon, these control the fetching and updating
|
| + // of the icon.
|
| + BitmapFetcherService* image_service_;
|
| + BitmapFetcherService::RequestId request_id_;
|
| + gfx::ImageSkia answer_image_;
|
| +
|
| // Default values cached here, may be overridden using the setters above.
|
| int edge_item_padding_;
|
| int item_padding_;
|
| @@ -191,6 +207,8 @@ class OmniboxResultView : public views::View,
|
|
|
| mutable int separator_width_;
|
|
|
| + base::WeakPtrFactory<OmniboxResultView> weak_ptr_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(OmniboxResultView);
|
| };
|
|
|
|
|