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

Side by Side Diff: ui/views/view_model_utils.h

Issue 10068027: ash: Fix launcher icon overlaps with status. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use last_visible_index_ part from 9808026 and add tests Created 8 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 unified diff | Download patch | Annotate | Revision Log
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 UI_VIEWS_VIEW_MODEL_UTILS_H_ 5 #ifndef UI_VIEWS_VIEW_MODEL_UTILS_H_
6 #define UI_VIEWS_VIEW_MODEL_UTILS_H_ 6 #define UI_VIEWS_VIEW_MODEL_UTILS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "ui/views/views_export.h" 10 #include "ui/views/views_export.h"
11 11
12 namespace views { 12 namespace views {
13 13
14 class View; 14 class View;
15 class ViewModel; 15 class ViewModel;
16 16
17 class VIEWS_EXPORT ViewModelUtils { 17 class VIEWS_EXPORT ViewModelUtils {
18 public: 18 public:
19 // Sets the bounds of each view to its ideal bounds. 19 // Sets the bounds of each view to its ideal bounds.
20 static void SetViewBoundsToIdealBounds(const ViewModel& model); 20 static void SetViewBoundsToIdealBounds(const ViewModel& model);
21 21
22 // Sets the visibility of each view to its ideal visibility.
23 static void SetViewVisibilityToIdealVisibility(const ViewModel& model);
24
22 // Returns the index to move |view| to based on a x-coordinate of |x|. 25 // Returns the index to move |view| to based on a x-coordinate of |x|.
23 static int DetermineMoveIndex(const ViewModel& model, 26 static int DetermineMoveIndex(const ViewModel& model,
24 View* view, 27 View* view,
25 int x); 28 int x);
26 29
27 private: 30 private:
28 DISALLOW_IMPLICIT_CONSTRUCTORS(ViewModelUtils); 31 DISALLOW_IMPLICIT_CONSTRUCTORS(ViewModelUtils);
29 }; 32 };
30 33
31 } // namespace views 34 } // namespace views
32 35
33 #endif // UI_VIEWS_VIEW_MODEL_UTILS_H_ 36 #endif // UI_VIEWS_VIEW_MODEL_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698