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

Side by Side Diff: ui/app_list/search_result_view.cc

Issue 10827198: Change View::HitTest to View::HitTestRect (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed errors reported by trybots Created 8 years, 4 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 "ui/app_list/search_result_view.h" 5 #include "ui/app_list/search_result_view.h"
6 6
7 #include "ui/app_list/search_result.h" 7 #include "ui/app_list/search_result.h"
8 #include "ui/app_list/search_result_list_view.h" 8 #include "ui/app_list/search_result_list_view.h"
9 #include "ui/gfx/canvas.h" 9 #include "ui/gfx/canvas.h"
10 #include "ui/gfx/font.h" 10 #include "ui/gfx/font.h"
(...skipping 21 matching lines...) Expand all
32 const SkColor kHoverAndPushedColor = SkColorSetARGB(0x05, 0, 0, 0); 32 const SkColor kHoverAndPushedColor = SkColorSetARGB(0x05, 0, 0, 0);
33 33
34 // A non-interactive image view to display result icon. 34 // A non-interactive image view to display result icon.
35 class IconView : public views::ImageView { 35 class IconView : public views::ImageView {
36 public: 36 public:
37 IconView() : ImageView() {} 37 IconView() : ImageView() {}
38 virtual ~IconView() {} 38 virtual ~IconView() {}
39 39
40 private: 40 private:
41 // views::View overrides: 41 // views::View overrides:
42 virtual bool HitTest(const gfx::Point& l) const OVERRIDE { 42 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE {
43 return false; 43 return false;
44 } 44 }
45 45
46 DISALLOW_COPY_AND_ASSIGN(IconView); 46 DISALLOW_COPY_AND_ASSIGN(IconView);
47 }; 47 };
48 48
49 // Creates a RenderText of given |text| and |styles|. Caller takes ownership 49 // Creates a RenderText of given |text| and |styles|. Caller takes ownership
50 // of returned RenderText. 50 // of returned RenderText.
51 gfx::RenderText* CreateRenderText(const string16& text, 51 gfx::RenderText* CreateRenderText(const string16& text,
52 const app_list::SearchResult::Tags& tags) { 52 const app_list::SearchResult::Tags& tags) {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // Scales down big icons but leave small ones unchanged. 217 // Scales down big icons but leave small ones unchanged.
218 if (image.width() > kIconDimension || image.height() > kIconDimension) 218 if (image.width() > kIconDimension || image.height() > kIconDimension)
219 icon_->SetImageSize(gfx::Size(kIconDimension, kIconDimension)); 219 icon_->SetImageSize(gfx::Size(kIconDimension, kIconDimension));
220 else 220 else
221 icon_->ResetImageSize(); 221 icon_->ResetImageSize();
222 222
223 icon_->SetImage(image); 223 icon_->SetImage(image);
224 } 224 }
225 225
226 } // namespace app_list 226 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list_item_view.cc ('k') | ui/views/accessibility/native_view_accessibility_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698