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

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

Issue 2978363002: Revert of Add a row in the network tray to inform users to turn Bluetooth on to enable Tether. (Closed)
Patch Set: 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
« no previous file with comments | « ash/system/network/network_list.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 <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;
25 class ProgressBar; 26 class ProgressBar;
26 class ScrollView; 27 class ScrollView;
27 } // namespace views 28 } // namespace views
28 29
29 namespace ash { 30 namespace ash {
30 31
31 class HoverHighlightView; 32 class HoverHighlightView;
32 class ScrollBorder; 33 class ScrollBorder;
33 class SystemTrayItem; 34 class SystemTrayItem;
34 class TriView; 35 class TriView;
35 36
36 class ASH_EXPORT TrayDetailsView : public views::View, 37 class ASH_EXPORT TrayDetailsView : public views::View,
37 public ViewClickListener, 38 public ViewClickListener,
38 public views::ButtonListener { 39 public views::ButtonListener {
39 public: 40 public:
40 explicit TrayDetailsView(SystemTrayItem* owner); 41 explicit TrayDetailsView(SystemTrayItem* owner);
41 ~TrayDetailsView() override; 42 ~TrayDetailsView() override;
42 43
43 // ViewClickListener: 44 // ViewClickListener:
44 // Don't override this --- override HandleViewClicked. 45 // Don't override this --- override HandleViewClicked.
45 void OnViewClicked(views::View* sender) final; 46 void OnViewClicked(views::View* sender) final;
46 47
47 // views::ButtonListener: 48 // views::ButtonListener:
48 // Don't override this --- override HandleButtonPressed. 49 // Don't override this --- override HandleButtonPressed.
49 void ButtonPressed(views::Button* sender, const ui::Event& event) final; 50 void ButtonPressed(views::Button* sender, const ui::Event& event) final;
50 51
51 SystemTrayItem* owner() { return owner_; } 52 SystemTrayItem* owner() { return owner_; }
52 53
53 protected: 54 protected:
55 // A view containing only a label, which is to be inserted as a non-targetable
56 // row within a system menu detailed view (e.g., the "Scanning for devices..."
57 // message that can appear at the top of the Bluetooth detailed view).
58 class InfoLabel : public View {
59 public:
60 explicit InfoLabel(int message_id);
61 ~InfoLabel() override;
62
63 void SetMessage(int message_id);
64
65 private:
66 views::Label* const label_;
67
68 DISALLOW_COPY_AND_ASSIGN(InfoLabel);
69 };
70
54 // views::View: 71 // views::View:
55 void Layout() override; 72 void Layout() override;
56 int GetHeightForWidth(int width) const override; 73 int GetHeightForWidth(int width) const override;
57 74
58 // Exposes the layout manager of this view to give control to subclasses. 75 // Exposes the layout manager of this view to give control to subclasses.
59 views::BoxLayout* box_layout() { return box_layout_; } 76 views::BoxLayout* box_layout() { return box_layout_; }
60 77
61 // Creates the row containing the back button and title. For material design 78 // Creates the row containing the back button and title. For material design
62 // this appears at the top of the view, for non-material design it appears 79 // this appears at the top of the view, for non-material design it appears
63 // at the bottom. 80 // at the bottom.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 176
160 // Used to delay the transition to the default view. 177 // Used to delay the transition to the default view.
161 base::OneShotTimer transition_delay_timer_; 178 base::OneShotTimer transition_delay_timer_;
162 179
163 DISALLOW_COPY_AND_ASSIGN(TrayDetailsView); 180 DISALLOW_COPY_AND_ASSIGN(TrayDetailsView);
164 }; 181 };
165 182
166 } // namespace ash 183 } // namespace ash
167 184
168 #endif // ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_ 185 #endif // ASH_SYSTEM_TRAY_TRAY_DETAILS_VIEW_H_
OLDNEW
« no previous file with comments | « ash/system/network/network_list.cc ('k') | ash/system/tray/tray_details_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698