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

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

Issue 2734653002: chromeos: Move files in //ash/common to //ash (Closed)
Patch Set: fix a11y tests, fix docs Created 3 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef ASH_COMMON_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_
6 #define ASH_COMMON_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_
7
8 #include "ash/ash_export.h"
9 #include "ash/common/session/session_state_observer.h"
10 #include "ash/common/shell_observer.h"
11 #include "ash/common/system/tray/tray_background_view.h"
12 #include "base/macros.h"
13
14 namespace views {
15 class ImageView;
16 }
17
18 namespace ash {
19
20 // Status area tray for showing a toggle for Overview Mode. Overview Mode
21 // is equivalent to WindowSelectorController being in selection mode.
22 // This hosts a ShellObserver that listens for the activation of Maximize Mode
23 // This tray will only be visible while in this state. This tray does not
24 // provide any bubble view windows.
25 class ASH_EXPORT OverviewButtonTray : public TrayBackgroundView,
26 public SessionStateObserver,
27 public ShellObserver {
28 public:
29 explicit OverviewButtonTray(WmShelf* wm_shelf);
30 ~OverviewButtonTray() override;
31
32 // Updates the tray's visibility based on the LoginStatus and the current
33 // state of MaximizeMode
34 virtual void UpdateAfterLoginStatusChange(LoginStatus status);
35
36 // ActionableView:
37 bool PerformAction(const ui::Event& event) override;
38
39 // SessionStateObserver:
40 void SessionStateChanged(session_manager::SessionState state) override;
41
42 // ShellObserver:
43 void OnMaximizeModeStarted() override;
44 void OnMaximizeModeEnded() override;
45 void OnOverviewModeStarting() override;
46 void OnOverviewModeEnded() override;
47
48 // TrayBackgroundView:
49 void ClickedOutsideBubble() override;
50 base::string16 GetAccessibleNameForTray() override;
51 void HideBubbleWithView(const views::TrayBubbleView* bubble_view) override;
52 void SetShelfAlignment(ShelfAlignment alignment) override;
53
54 private:
55 friend class OverviewButtonTrayTest;
56
57 // Creates a new border for the icon. The padding is determined based on the
58 // alignment of the shelf.
59 void SetIconBorderForShelfAlignment();
60
61 // Sets the icon to visible if maximize mode is enabled and
62 // WindowSelectorController::CanSelect.
63 void UpdateIconVisibility();
64
65 // Weak pointer, will be parented by TrayContainer for its lifetime.
66 views::ImageView* icon_;
67
68 DISALLOW_COPY_AND_ASSIGN(OverviewButtonTray);
69 };
70
71 } // namespace ash
72
73 #endif // ASH_COMMON_SYSTEM_OVERVIEW_OVERVIEW_BUTTON_TRAY_H_
OLDNEW
« no previous file with comments | « ash/common/system/networking_config_delegate.cc ('k') | ash/common/system/overview/overview_button_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698