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

Side by Side Diff: ash/system/tray/tray_background_view.h

Issue 10830190: Fix status area tray spacing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 4 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
« no previous file with comments | « ash/system/tray/system_tray_unittest.cc ('k') | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ 5 #ifndef ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
6 #define ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ 6 #define ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/launcher/background_animator.h" 9 #include "ash/launcher/background_animator.h"
10 #include "ash/system/tray/tray_views.h" 10 #include "ash/system/tray/tray_views.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 // Sets |contents| as a child and sets its background to |background_|. 75 // Sets |contents| as a child and sets its background to |background_|.
76 void SetContents(views::View* contents); 76 void SetContents(views::View* contents);
77 77
78 // Sets whether the tray paints a background. Default is true, but is set to 78 // Sets whether the tray paints a background. Default is true, but is set to
79 // false if a window overlaps the shelf. 79 // false if a window overlaps the shelf.
80 void SetPaintsBackground( 80 void SetPaintsBackground(
81 bool value, 81 bool value,
82 internal::BackgroundAnimator::ChangeType change_type); 82 internal::BackgroundAnimator::ChangeType change_type);
83 83
84 // Called after all status area trays have been created. Sets the border
85 // based on the position of the view.
86 void SetBorder();
87
84 StatusAreaWidget* status_area_widget() { 88 StatusAreaWidget* status_area_widget() {
85 return status_area_widget_; 89 return status_area_widget_;
86 } 90 }
87 TrayContainer* tray_container() const { return tray_container_; } 91 TrayContainer* tray_container() const { return tray_container_; }
88 ShelfAlignment shelf_alignment() const { return shelf_alignment_; } 92 ShelfAlignment shelf_alignment() const { return shelf_alignment_; }
89 93
90 private: 94 private:
91 void SetBorder();
92
93 // Unowned pointer to parent widget. 95 // Unowned pointer to parent widget.
94 StatusAreaWidget* status_area_widget_; 96 StatusAreaWidget* status_area_widget_;
95 97
96 // Convenience pointer to the contents view. 98 // Convenience pointer to the contents view.
97 TrayContainer* tray_container_; 99 TrayContainer* tray_container_;
98 100
99 // Shelf alignment. 101 // Shelf alignment.
100 ShelfAlignment shelf_alignment_; 102 ShelfAlignment shelf_alignment_;
101 103
102 // Owned by the view passed to SetContents(). 104 // Owned by the view passed to SetContents().
103 internal::TrayBackground* background_; 105 internal::TrayBackground* background_;
104 106
105 internal::BackgroundAnimator hide_background_animator_; 107 internal::BackgroundAnimator hide_background_animator_;
106 internal::BackgroundAnimator hover_background_animator_; 108 internal::BackgroundAnimator hover_background_animator_;
107 109
108 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView); 110 DISALLOW_COPY_AND_ASSIGN(TrayBackgroundView);
109 }; 111 };
110 112
111 } // namespace internal 113 } // namespace internal
112 } // namespace ash 114 } // namespace ash
113 115
114 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_ 116 #endif // ASH_SYSTEM_TRAY_TRAY_BACKGROUND_VIEW_H_
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_unittest.cc ('k') | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698