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

Side by Side Diff: ash/wm/overview/scoped_transform_overview_window.h

Issue 231643002: Added labels under the windows in OverviewMode displaying their current name. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added animations to labels :) Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ 5 #ifndef ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_
6 #define ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ 6 #define ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 17 matching lines...) Expand all
28 28
29 // Manages a window in the overview mode. This class allows transforming the 29 // Manages a window in the overview mode. This class allows transforming the
30 // window with a helper to determine the best fit in certain bounds and 30 // window with a helper to determine the best fit in certain bounds and
31 // copies the window if being moved to another display. The window's state is 31 // copies the window if being moved to another display. The window's state is
32 // restored on destruction of this object. 32 // restored on destruction of this object.
33 class ScopedTransformOverviewWindow { 33 class ScopedTransformOverviewWindow {
34 public: 34 public:
35 // The duration of transitions used for window transforms. 35 // The duration of transitions used for window transforms.
36 static const int kTransitionMilliseconds; 36 static const int kTransitionMilliseconds;
37 37
38 // The time for the different views that must be shown to fade in, ie window
39 // labels and close buttons
tdanderson 2014/04/10 22:37:12 I'd reword to be more like the old comment to make
Nina 2014/04/14 16:24:04 Done.
40 static const int kFadeInMilliseconds;
41
38 // Returns |rect| having been shrunk to fit within |bounds| (preserving the 42 // Returns |rect| having been shrunk to fit within |bounds| (preserving the
39 // aspect ratio). 43 // aspect ratio).
40 static gfx::Rect ShrinkRectToFitPreservingAspectRatio( 44 static gfx::Rect ShrinkRectToFitPreservingAspectRatio(
41 const gfx::Rect& rect, 45 const gfx::Rect& rect,
42 const gfx::Rect& bounds); 46 const gfx::Rect& bounds);
43 47
44 // Returns the transform turning |src_rect| into |dst_rect|. 48 // Returns the transform turning |src_rect| into |dst_rect|.
45 static gfx::Transform GetTransformForRect(const gfx::Rect& src_rect, 49 static gfx::Transform GetTransformForRect(const gfx::Rect& src_rect,
46 const gfx::Rect& dst_rect); 50 const gfx::Rect& dst_rect);
47 51
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 113
110 // The original transform of the window before entering overview mode. 114 // The original transform of the window before entering overview mode.
111 gfx::Transform original_transform_; 115 gfx::Transform original_transform_;
112 116
113 DISALLOW_COPY_AND_ASSIGN(ScopedTransformOverviewWindow); 117 DISALLOW_COPY_AND_ASSIGN(ScopedTransformOverviewWindow);
114 }; 118 };
115 119
116 } // namespace ash 120 } // namespace ash
117 121
118 #endif // ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_ 122 #endif // ASH_WM_OVERVIEW_SCOPED_TRANSFORM_OVERVIEW_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698