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

Side by Side Diff: ash/system/cast/tray_cast.h

Issue 1218653006: Add support code to test the cast system tray item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_CAST_TRAY_CAST_H_ 5 #ifndef ASH_SYSTEM_CAST_TRAY_CAST_H_
6 #define ASH_SYSTEM_CAST_TRAY_CAST_H_ 6 #define ASH_SYSTEM_CAST_TRAY_CAST_H_
7 7
8 #include "ash/ash_export.h"
8 #include "ash/cast_config_delegate.h" 9 #include "ash/cast_config_delegate.h"
9 #include "ash/shell_observer.h" 10 #include "ash/shell_observer.h"
11 #include "ash/system/cast/tray_cast_testing_interface.h"
10 #include "ash/system/tray/system_tray_item.h" 12 #include "ash/system/tray/system_tray_item.h"
11 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
12 14
13 namespace ash { 15 namespace ash {
14 namespace tray { 16 namespace tray {
15 class CastTrayView; 17 class CastTrayView;
16 class CastSelectDefaultView; 18 class CastSelectDefaultView;
17 class CastDetailedView; 19 class CastDetailedView;
18 class CastDuplexView; 20 class CastDuplexView;
19 } // namespace tray 21 } // namespace tray
20 22
21 class TrayCast : public SystemTrayItem, public ShellObserver { 23 class ASH_EXPORT TrayCast : public SystemTrayItem,
24 public ShellObserver,
25 public TrayCastTestingInterface {
22 public: 26 public:
23 explicit TrayCast(SystemTray* system_tray); 27 explicit TrayCast(SystemTray* system_tray);
24 ~TrayCast() override; 28 ~TrayCast() override;
25 29
26 private: 30 private:
31 // Overridden from TrayCastTestingInterface.
32 bool IsTrayInitializedForTest() const override;
33 bool IsTrayVisibleForTest() const override;
34 bool IsTrayCastViewVisibleForTest() const override;
35 bool IsTraySelectViewVisibleForTest() const override;
36 void StartCastForTest(const std::string& receiver_id) override;
37 void StopCastForTest() override;
38
27 // Overridden from SystemTrayItem. 39 // Overridden from SystemTrayItem.
28 views::View* CreateTrayView(user::LoginStatus status) override; 40 views::View* CreateTrayView(user::LoginStatus status) override;
29 views::View* CreateDefaultView(user::LoginStatus status) override; 41 views::View* CreateDefaultView(user::LoginStatus status) override;
30 views::View* CreateDetailedView(user::LoginStatus status) override; 42 views::View* CreateDetailedView(user::LoginStatus status) override;
31 void DestroyTrayView() override; 43 void DestroyTrayView() override;
32 void DestroyDefaultView() override; 44 void DestroyDefaultView() override;
33 void DestroyDetailedView() override; 45 void DestroyDetailedView() override;
34 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; 46 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override;
35 47
36 // Overridden from ShellObserver. 48 // Overridden from ShellObserver.
(...skipping 23 matching lines...) Expand all
60 bool has_cast_receivers_ = false; 72 bool has_cast_receivers_ = false;
61 bool is_casting_ = false; 73 bool is_casting_ = false;
62 base::WeakPtrFactory<TrayCast> weak_ptr_factory_; 74 base::WeakPtrFactory<TrayCast> weak_ptr_factory_;
63 75
64 DISALLOW_COPY_AND_ASSIGN(TrayCast); 76 DISALLOW_COPY_AND_ASSIGN(TrayCast);
65 }; 77 };
66 78
67 } // namespace ash 79 } // namespace ash
68 80
69 #endif // ASH_SYSTEM_CAST_TRAY_CAST_H_ 81 #endif // ASH_SYSTEM_CAST_TRAY_CAST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698