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

Unified Diff: views/controls/image_view.h

Issue 1578021: Shift omnibox dropdown in and up on Windows, and square off the top, so it co... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
Index: views/controls/image_view.h
===================================================================
--- views/controls/image_view.h (revision 43969)
+++ views/controls/image_view.h (working copy)
@@ -55,6 +55,9 @@
// size.
bool GetImageSize(gfx::Size* image_size);
+ // Returns the actual bounds of the visible image inside the view.
+ gfx::Rect GetImageBounds() const;
+
// Reset the image size to the current image dimensions.
void ResetImageSize();
@@ -70,19 +73,16 @@
void SetTooltipText(const std::wstring& tooltip);
std::wstring GetTooltipText();
- // Return whether the image should be centered inside the view.
// Overriden from View
virtual gfx::Size GetPreferredSize();
virtual void Paint(gfx::Canvas* canvas);
virtual bool GetAccessibleRole(AccessibilityTypes::Role* role);
-
- // Overriden from View.
virtual bool GetTooltipText(const gfx::Point& p, std::wstring* tooltip);
private:
// Compute the image origin given the desired size and the receiver alignment
// properties.
- void ComputeImageOrigin(int image_width, int image_height, int *x, int *y);
+ gfx::Point ComputeImageOrigin(const gfx::Size& image_size) const;
// Whether the image size is set.
bool image_size_set_;

Powered by Google App Engine
This is Rietveld 408576698