diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-10 15:43:53 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-10 15:43:53 +0000 |
commit | 5544450654bfa0c36809e104014dd96215d05b4d (patch) | |
tree | cdf089e5aff5c4f5329648ddf06751fd3adc6f74 /ui/views/view_model_utils.h | |
parent | b0055b9c2fb9713631930dfa95d1112b0c7ec590 (diff) | |
download | chromium_src-5544450654bfa0c36809e104014dd96215d05b4d.zip chromium_src-5544450654bfa0c36809e104014dd96215d05b4d.tar.gz chromium_src-5544450654bfa0c36809e104014dd96215d05b4d.tar.bz2 |
Adds the option of aligning the launcher to the left or right. There
is a ton of rough edges after this patch, but I don't want this patch
to get any bigger.
BUG=121962
TEST=covered by tests.
R=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10388036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136312 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/view_model_utils.h')
-rw-r--r-- | ui/views/view_model_utils.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ui/views/view_model_utils.h b/ui/views/view_model_utils.h index d7f8bd3..2993aaa 100644 --- a/ui/views/view_model_utils.h +++ b/ui/views/view_model_utils.h @@ -16,16 +16,23 @@ class ViewModel; class VIEWS_EXPORT ViewModelUtils { public: + enum Alignment { + HORIZONTAL, + VERTICAL + }; + // Sets the bounds of each view to its ideal bounds. static void SetViewBoundsToIdealBounds(const ViewModel& model); // Returns true if the Views in |model| are at their ideal bounds. static bool IsAtIdealBounds(const ViewModel& model); - // Returns the index to move |view| to based on a x-coordinate of |x|. + // Returns the index to move |view| to based on a coordinate of |x| and |y|. static int DetermineMoveIndex(const ViewModel& model, View* view, - int x); + Alignment alignment, + int x, + int y); private: DISALLOW_IMPLICIT_CONSTRUCTORS(ViewModelUtils); |