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

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

Issue 2453133002: [ash-md] Makes Wi-Fi header row sticky when network list is scrolled (Closed)
Patch Set: [ash-md] Makes Wi-Fi header row sticky when network list is scrolled (avoid set_id()) Created 4 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
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_COMMON_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_
6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/common/system/tray/header_list_scroll_view.h"
9 #include "ash/common/system/tray/special_popup_row.h" 10 #include "ash/common/system/tray/special_popup_row.h"
10 #include "ash/common/system/tray/view_click_listener.h" 11 #include "ash/common/system/tray/view_click_listener.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "ui/views/controls/button/button.h" 13 #include "ui/views/controls/button/button.h"
13 #include "ui/views/view.h" 14 #include "ui/views/view.h"
14 15
15 namespace views { 16 namespace views {
16 class ScrollView; 17 class ScrollView;
17 class ProgressBar; 18 class ProgressBar;
18 } // namespace views 19 } // namespace views
(...skipping 16 matching lines...) Expand all
35 36
36 // ViewClickListener: 37 // ViewClickListener:
37 void OnViewClicked(views::View* sender) override; 38 void OnViewClicked(views::View* sender) override;
38 39
39 // views::ButtonListener: 40 // views::ButtonListener:
40 void ButtonPressed(views::Button* sender, const ui::Event& event) override; 41 void ButtonPressed(views::Button* sender, const ui::Event& event) override;
41 42
42 SystemTrayItem* owner() { return owner_; } 43 SystemTrayItem* owner() { return owner_; }
43 SpecialPopupRow* title_row() { return title_row_; } 44 SpecialPopupRow* title_row() { return title_row_; }
44 FixedSizedScrollView* scroller() { return scroller_; } 45 FixedSizedScrollView* scroller() { return scroller_; }
45 views::View* scroll_content() { return scroll_content_; } 46 HeaderListScrollView* scroll_content() { return scroll_content_; }
46 views::ProgressBar* progress_bar() { return progress_bar_; } 47 views::ProgressBar* progress_bar() { return progress_bar_; }
47 48
48 protected: 49 protected:
49 // views::View: 50 // views::View:
50 void Layout() override; 51 void Layout() override;
51 void OnPaintBorder(gfx::Canvas* canvas) override; 52 void OnPaintBorder(gfx::Canvas* canvas) override;
52 53
53 // Creates the row containing the back button and title. For material design 54 // Creates the row containing the back button and title. For material design
54 // this appears at the top of the view, for non-material design it appears 55 // this appears at the top of the view, for non-material design it appears
55 // at the bottom. 56 // at the bottom.
(...skipping 27 matching lines...) Expand all
83 virtual void CreateExtraTitleRowButtons(); 84 virtual void CreateExtraTitleRowButtons();
84 85
85 // Transition to default view from details view. If |title_row_| has focus 86 // Transition to default view from details view. If |title_row_| has focus
86 // before transition, the default view should focus on the owner of this 87 // before transition, the default view should focus on the owner of this
87 // details view. 88 // details view.
88 void TransitionToDefaultView(); 89 void TransitionToDefaultView();
89 90
90 SystemTrayItem* owner_; 91 SystemTrayItem* owner_;
91 SpecialPopupRow* title_row_; 92 SpecialPopupRow* title_row_;
92 FixedSizedScrollView* scroller_; 93 FixedSizedScrollView* scroller_;
93 views::View* scroll_content_; 94 HeaderListScrollView* scroll_content_;
94 views::ProgressBar* progress_bar_; 95 views::ProgressBar* progress_bar_;
95 96
96 // |title_row_separator_| has a views::Separator as a child and, optionally, 97 // |title_row_separator_| has a views::Separator as a child and, optionally,
97 // |progress_bar_| as a child. 98 // |progress_bar_| as a child.
98 views::View* title_row_separator_; 99 views::View* title_row_separator_;
99 100
100 ScrollBorder* scroll_border_; // Weak reference 101 ScrollBorder* scroll_border_; // Weak reference
101 102
102 // The back button that appears in the material design title row. Not owned. 103 // The back button that appears in the material design title row. Not owned.
103 views::Button* back_button_; 104 views::Button* back_button_;
104 105
105 DISALLOW_COPY_AND_ASSIGN(TrayDetailsView); 106 DISALLOW_COPY_AND_ASSIGN(TrayDetailsView);
106 }; 107 };
107 108
108 } // namespace ash 109 } // namespace ash
109 110
110 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_ 111 #endif // ASH_COMMON_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698