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

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

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix single-letter typo :(. Created 8 years, 1 month 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_details_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_DETAILS_VIEW_H_ 5 #ifndef ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_
6 #define ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_ 6 #define ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_
7 7
8 #include "ui/views/view.h" 8 #include "ui/views/view.h"
9 9
10 namespace views { 10 namespace views {
11 class ScrollView; 11 class ScrollView;
12 } 12 }
13 13
14 namespace ash { 14 namespace ash {
15
16 class SystemTrayItem;
17
15 namespace internal { 18 namespace internal {
16 19
17 class FixedSizedScrollView; 20 class FixedSizedScrollView;
18 class ScrollBorder; 21 class ScrollBorder;
19 class SpecialPopupRow; 22 class SpecialPopupRow;
20 class ViewClickListener; 23 class ViewClickListener;
21 24
22 class TrayDetailsView : public views::View { 25 class TrayDetailsView : public views::View {
23 public: 26 public:
24 TrayDetailsView(); 27 explicit TrayDetailsView(SystemTrayItem* owner);
25 virtual ~TrayDetailsView(); 28 virtual ~TrayDetailsView();
26 29
27 // Creates a row with special highlighting etc. This is typically the 30 // Creates a row with special highlighting etc. This is typically the
28 // bottom-most row in the popup. 31 // bottom-most row in the popup.
29 void CreateSpecialRow(int string_id, ViewClickListener* listener); 32 void CreateSpecialRow(int string_id, ViewClickListener* listener);
30 33
31 // Creates a scrollable list. The list has a border at the bottom if there is 34 // Creates a scrollable list. The list has a border at the bottom if there is
32 // any other view between the list and the footer row at the bottom. 35 // any other view between the list and the footer row at the bottom.
33 void CreateScrollableList(); 36 void CreateScrollableList();
34 37
35 // Removes (and destroys) all child views. 38 // Removes (and destroys) all child views.
36 void Reset(); 39 void Reset();
37 40
41 SystemTrayItem* owner() const { return owner_; }
38 SpecialPopupRow* footer() const { return footer_; } 42 SpecialPopupRow* footer() const { return footer_; }
39 FixedSizedScrollView* scroller() const { return scroller_; } 43 FixedSizedScrollView* scroller() const { return scroller_; }
40 views::View* scroll_content() const { return scroll_content_; } 44 views::View* scroll_content() const { return scroll_content_; }
41 45
42 protected: 46 protected:
43 // Overridden from views::View. 47 // Overridden from views::View.
44 virtual void Layout() OVERRIDE; 48 virtual void Layout() OVERRIDE;
45 virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE; 49 virtual void OnPaintBorder(gfx::Canvas* canvas) OVERRIDE;
46 50
47 private: 51 private:
52 SystemTrayItem* owner_;
48 SpecialPopupRow* footer_; 53 SpecialPopupRow* footer_;
49 FixedSizedScrollView* scroller_; 54 FixedSizedScrollView* scroller_;
50 views::View* scroll_content_; 55 views::View* scroll_content_;
51 ScrollBorder* scroll_border_; 56 ScrollBorder* scroll_border_;
52 57
53 DISALLOW_COPY_AND_ASSIGN(TrayDetailsView); 58 DISALLOW_COPY_AND_ASSIGN(TrayDetailsView);
54 }; 59 };
55 60
56 } // namespace internal 61 } // namespace internal
57 } // namespace ash 62 } // namespace ash
58 63
59 #endif // ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_ 64 #endif // ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_unittest.cc ('k') | ash/system/tray/tray_details_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698