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

Side by Side Diff: ash/system/overview/overview_button_tray.h

Issue 212553005: Overview Tray Button should not be visible on login screen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 | « no previous file | ash/system/overview/overview_button_tray.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ 5 #ifndef ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_
6 #define ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ 6 #define ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "ash/shell_observer.h" 9 #include "ash/shell_observer.h"
10 #include "ash/system/tray/tray_background_view.h" 10 #include "ash/system/tray/tray_background_view.h"
11 11
12 namespace views { 12 namespace views {
13 class ImageView; 13 class ImageView;
14 } 14 }
15 15
16 namespace ash { 16 namespace ash {
17 17
18 // Status area tray for showing a toggle for Overview Mode. Overview Mode 18 // Status area tray for showing a toggle for Overview Mode. Overview Mode
19 // is equivalent to WindowSelectorController being in selection mode. 19 // is equivalent to WindowSelectorController being in selection mode.
20 // This hosts a ShellObserver that listens for the activation of Maximize Mode 20 // This hosts a ShellObserver that listens for the activation of Maximize Mode
21 // This tray will only be visible while in this state. This tray does not 21 // This tray will only be visible while in this state. This tray does not
22 // provide any bubble view windows. 22 // provide any bubble view windows.
23 class ASH_EXPORT OverviewButtonTray : public internal::TrayBackgroundView, 23 class ASH_EXPORT OverviewButtonTray : public internal::TrayBackgroundView,
24 public ShellObserver { 24 public ShellObserver {
25 public: 25 public:
26 explicit OverviewButtonTray(internal::StatusAreaWidget* status_area_widget); 26 explicit OverviewButtonTray(internal::StatusAreaWidget* status_area_widget);
27 virtual ~OverviewButtonTray(); 27 virtual ~OverviewButtonTray();
28 28
29 // Updates the tray's visibility based on the LoginStatus and the current
30 // state of MaximizeMode
31 virtual void UpdateAfterLoginStatusChange(user::LoginStatus status);
32
29 // internal::ActionableView: 33 // internal::ActionableView:
30 virtual bool PerformAction(const ui::Event& event) OVERRIDE; 34 virtual bool PerformAction(const ui::Event& event) OVERRIDE;
31 35
32 // ShellObserver: 36 // ShellObserver:
33 virtual void OnMaximizeModeStarted() OVERRIDE; 37 virtual void OnMaximizeModeStarted() OVERRIDE;
34 virtual void OnMaximizeModeEnded() OVERRIDE; 38 virtual void OnMaximizeModeEnded() OVERRIDE;
35 39
36 // internal::TrayBackgroundView: 40 // internal::TrayBackgroundView:
37 virtual bool ClickedOutsideBubble() OVERRIDE; 41 virtual bool ClickedOutsideBubble() OVERRIDE;
38 virtual base::string16 GetAccessibleNameForTray() OVERRIDE; 42 virtual base::string16 GetAccessibleNameForTray() OVERRIDE;
39 virtual void HideBubbleWithView( 43 virtual void HideBubbleWithView(
40 const views::TrayBubbleView* bubble_view) OVERRIDE; 44 const views::TrayBubbleView* bubble_view) OVERRIDE;
41 virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE; 45 virtual void SetShelfAlignment(ShelfAlignment alignment) OVERRIDE;
42 46
43 private: 47 private:
44 friend class OverviewButtonTrayTest; 48 friend class OverviewButtonTrayTest;
45 49
46 // Creates a new border for the icon. The padding is determined based on the 50 // Creates a new border for the icon. The padding is determined based on the
47 // alignment of the shelf. 51 // alignment of the shelf.
48 void SetIconBorderForShelfAlignment(); 52 void SetIconBorderForShelfAlignment();
49 53
54 // Sets the icon to visible if |maximize_mode_enabled| and
55 // WindowSelectorController::CanSelect.
56 void UpdateIconVisibility(bool maximize_mode_enabled);
57
50 // Weak pointer, will be parented by TrayContainer for its lifetime. 58 // Weak pointer, will be parented by TrayContainer for its lifetime.
51 views::ImageView* icon_; 59 views::ImageView* icon_;
52 60
53 DISALLOW_COPY_AND_ASSIGN(OverviewButtonTray); 61 DISALLOW_COPY_AND_ASSIGN(OverviewButtonTray);
54 }; 62 };
55 63
56 } // namespace ash 64 } // namespace ash
57 65
58 #endif // ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_ 66 #endif // ASH_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_
OLDNEW
« no previous file with comments | « no previous file | ash/system/overview/overview_button_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698