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

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

Issue 2957043002: Add a row in the network tray to inform users to turn Bluetooth on to enable Tether. (Closed)
Patch Set: khorimoto@ comments Created 3 years, 5 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 (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 <memory> 8 #include <memory>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "ash/system/tray/tray_constants.h" 11 #include "ash/system/tray/tray_constants.h"
12 #include "ash/system/tray/view_click_listener.h" 12 #include "ash/system/tray/view_click_listener.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/timer/timer.h" 14 #include "base/timer/timer.h"
15 #include "ui/views/controls/button/button.h" 15 #include "ui/views/controls/button/button.h"
16 #include "ui/views/view.h" 16 #include "ui/views/view.h"
17 17
18 namespace gfx { 18 namespace gfx {
19 struct VectorIcon; 19 struct VectorIcon;
20 } // namespace gfx 20 } // namespace gfx
21 21
22 namespace views { 22 namespace views {
23 class BoxLayout; 23 class BoxLayout;
24 class CustomButton; 24 class CustomButton;
25 class Label;
26 class ProgressBar; 25 class ProgressBar;
27 class ScrollView; 26 class ScrollView;
28 } // namespace views 27 } // namespace views
29 28
30 namespace ash { 29 namespace ash {
31 namespace test { 30 namespace test {
32 class TrayDetailsViewTest; 31 class TrayDetailsViewTest;
33 } // namespace test 32 } // namespace test
34 33
35 class HoverHighlightView; 34 class HoverHighlightView;
(...skipping 12 matching lines...) Expand all
48 // Don't override this --- override HandleViewClicked. 47 // Don't override this --- override HandleViewClicked.
49 void OnViewClicked(views::View* sender) final; 48 void OnViewClicked(views::View* sender) final;
50 49
51 // views::ButtonListener: 50 // views::ButtonListener:
52 // Don't override this --- override HandleButtonPressed. 51 // Don't override this --- override HandleButtonPressed.
53 void ButtonPressed(views::Button* sender, const ui::Event& event) final; 52 void ButtonPressed(views::Button* sender, const ui::Event& event) final;
54 53
55 SystemTrayItem* owner() { return owner_; } 54 SystemTrayItem* owner() { return owner_; }
56 55
57 protected: 56 protected:
58 // A view containing only a label, which is to be inserted as a non-targetable
59 // row within a system menu detailed view (e.g., the "Scanning for devices..."
60 // message that can appear at the top of the Bluetooth detailed view).
61 class InfoLabel : public View {
62 public:
63 explicit InfoLabel(int message_id);
64 ~InfoLabel() override;
65
66 void SetMessage(int message_id);
67
68 private:
69 views::Label* const label_;
70
71 DISALLOW_COPY_AND_ASSIGN(InfoLabel);
72 };
73
74 // views::View: 57 // views::View:
75 void Layout() override; 58 void Layout() override;
76 int GetHeightForWidth(int width) const override; 59 int GetHeightForWidth(int width) const override;
77 60
78 // Exposes the layout manager of this view to give control to subclasses. 61 // Exposes the layout manager of this view to give control to subclasses.
79 views::BoxLayout* box_layout() { return box_layout_; } 62 views::BoxLayout* box_layout() { return box_layout_; }
80 63
81 // Creates the row containing the back button and title. For material design 64 // Creates the row containing the back button and title. For material design
82 // this appears at the top of the view, for non-material design it appears 65 // this appears at the top of the view, for non-material design it appears
83 // at the bottom. 66 // at the bottom.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 162
180 // Used to delay the transition to the default view. 163 // Used to delay the transition to the default view.
181 base::OneShotTimer transition_delay_timer_; 164 base::OneShotTimer transition_delay_timer_;
182 165
183 DISALLOW_COPY_AND_ASSIGN(TrayDetailsView); 166 DISALLOW_COPY_AND_ASSIGN(TrayDetailsView);
184 }; 167 };
185 168
186 } // namespace ash 169 } // namespace ash
187 170
188 #endif // ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_ 171 #endif // ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698