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

Side by Side Diff: ash/launcher/launcher_button.h

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
« no previous file with comments | « no previous file | ash/launcher/launcher_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef ASH_LAUNCHER_LAUNCHER_BUTTON_H_ 5 #ifndef ASH_LAUNCHER_LAUNCHER_BUTTON_H_
6 #define ASH_LAUNCHER_LAUNCHER_BUTTON_H_ 6 #define ASH_LAUNCHER_LAUNCHER_BUTTON_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/gfx/shadow_value.h" 9 #include "ui/gfx/shadow_value.h"
10 #include "ui/views/controls/button/custom_button.h" 10 #include "ui/views/controls/button/custom_button.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // implementation, by overriding CreateIconView(). 64 // implementation, by overriding CreateIconView().
65 class IconView : public views::ImageView { 65 class IconView : public views::ImageView {
66 public: 66 public:
67 IconView(); 67 IconView();
68 virtual ~IconView(); 68 virtual ~IconView();
69 69
70 void set_icon_size(int icon_size) { icon_size_ = icon_size; } 70 void set_icon_size(int icon_size) { icon_size_ = icon_size; }
71 int icon_size() const { return icon_size_; } 71 int icon_size() const { return icon_size_; }
72 72
73 // views::View overrides. 73 // views::View overrides.
74 virtual bool HitTest(const gfx::Point& l) const OVERRIDE; 74 virtual bool HitTestRect(const gfx::Rect& rect) const OVERRIDE;
75 75
76 private: 76 private:
77 // Set to non-zero to force icons to be resized to fit within a square, 77 // Set to non-zero to force icons to be resized to fit within a square,
78 // while maintaining original proportions. 78 // while maintaining original proportions.
79 int icon_size_; 79 int icon_size_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(IconView); 81 DISALLOW_COPY_AND_ASSIGN(IconView);
82 }; 82 };
83 83
84 // View overrides: 84 // View overrides:
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 gfx::ShadowValues icon_shadows_; 132 gfx::ShadowValues icon_shadows_;
133 133
134 DISALLOW_COPY_AND_ASSIGN(LauncherButton); 134 DISALLOW_COPY_AND_ASSIGN(LauncherButton);
135 }; 135 };
136 136
137 } // namespace internal 137 } // namespace internal
138 } // namespace ash 138 } // namespace ash
139 139
140 #endif // ASH_LAUNCHER_LAUNCHER_BUTTON_H_ 140 #endif // ASH_LAUNCHER_LAUNCHER_BUTTON_H_
OLDNEW
« no previous file with comments | « no previous file | ash/launcher/launcher_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698