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

Side by Side Diff: ash/wm/overview/window_selector_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: 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_WINDOW_SELECTOR_WINDOW_H_ 5 #ifndef ASH_WM_OVERVIEW_WINDOW_SELECTOR_WINDOW_H_
6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_WINDOW_H_ 6 #define ASH_WM_OVERVIEW_WINDOW_SELECTOR_WINDOW_H_
7 7
8 #include "ash/wm/overview/scoped_transform_overview_window.h" 8 #include "ash/wm/overview/scoped_transform_overview_window.h"
9 #include "ash/wm/overview/window_selector_item.h" 9 #include "ash/wm/overview/window_selector_item.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "ui/gfx/rect.h" 12 #include "ui/gfx/rect.h"
13 #include "ui/views/controls/button/button.h" 13 #include "ui/views/controls/button/button.h"
14 #include "ui/views/controls/label.h"
tdanderson 2014/04/09 20:35:17 This #include can be moved to the .cc file.
14 15
15 namespace aura { 16 namespace aura {
16 class Window; 17 class Window;
17 } 18 }
18 19
19 namespace views { 20 namespace views {
20 class Widget; 21 class Widget;
21 } 22 }
22 23
23 namespace ash { 24 namespace ash {
(...skipping 16 matching lines...) Expand all
40 virtual bool empty() const OVERRIDE; 41 virtual bool empty() const OVERRIDE;
41 virtual void PrepareForOverview() OVERRIDE; 42 virtual void PrepareForOverview() OVERRIDE;
42 virtual void SetItemBounds(aura::Window* root_window, 43 virtual void SetItemBounds(aura::Window* root_window,
43 const gfx::Rect& target_bounds, 44 const gfx::Rect& target_bounds,
44 bool animate) OVERRIDE; 45 bool animate) OVERRIDE;
45 46
46 // views::ButtonListener: 47 // views::ButtonListener:
47 virtual void ButtonPressed(views::Button* sender, 48 virtual void ButtonPressed(views::Button* sender,
48 const ui::Event& event) OVERRIDE; 49 const ui::Event& event) OVERRIDE;
49 50
51 // Foreground label color. Right now it's white
52 const static int kLabelColor = 0xFFFFFFFF;
tdanderson 2014/04/09 20:35:17 static const instead of const static. Also, decla
53
54 // Background label color. Right now it's black.
55 const static int kLabelBackground = 0x000000;
56
50 private: 57 private:
51 // Creates the close button window if it does not exist and updates the bounds 58 // Creates the close button window if it does not exist and updates the bounds
52 // to match the window selector item. 59 // to match the window selector item.
53 void UpdateCloseButtonBounds(); 60 void UpdateCloseButtonBounds();
54 61
62 // IDEM UpdateCloseButtonBounds, creates a label to display under the window
63 // and/or updates the bounds accordingly
64 void UpdateWindowLabels(const gfx::Rect& target_bounds);
65
55 // The window with a scoped transform represented by this selector item. 66 // The window with a scoped transform represented by this selector item.
56 ScopedTransformOverviewWindow transform_window_; 67 ScopedTransformOverviewWindow transform_window_;
57 68
58 // An easy to access close button for the window in this item. 69 // An easy to access close button for the window in this item.
59 scoped_ptr<views::Widget> close_button_; 70 scoped_ptr<views::Widget> close_button_;
60 71
72 // Label under the window with the tab name.
73 scoped_ptr<views::Widget> window_label_;
74
61 DISALLOW_COPY_AND_ASSIGN(WindowSelectorWindow); 75 DISALLOW_COPY_AND_ASSIGN(WindowSelectorWindow);
62 }; 76 };
63 77
64 } // namespace ash 78 } // namespace ash
65 79
66 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_WINDOW_H_ 80 #endif // ASH_WM_OVERVIEW_WINDOW_SELECTOR_WINDOW_H_
OLDNEW
« no previous file with comments | « no previous file | ash/wm/overview/window_selector_window.cc » ('j') | ash/wm/overview/window_selector_window.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698