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

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
« no previous file with comments | « ash/ash.gyp ('k') | ash/system/cast/tray_cast.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 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/cast_config_delegate.h" 8 #include "ash/cast_config_delegate.h"
9 #include "ash/shell_observer.h" 9 #include "ash/shell_observer.h"
10 #include "ash/system/tray/system_tray_item.h" 10 #include "ash/system/tray/system_tray_item.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 12
13 namespace ash { 13 namespace ash {
14 namespace tray { 14 namespace tray {
15 class CastTrayView; 15 class CastTrayView;
16 class CastSelectDefaultView; 16 class CastSelectDefaultView;
17 class CastDetailedView; 17 class CastDetailedView;
18 class CastDuplexView; 18 class CastDuplexView;
19 } // namespace tray 19 } // namespace tray
20 20
21 class TrayCast : public SystemTrayItem, public ShellObserver { 21 class ASH_EXPORT TrayCast : public SystemTrayItem, public ShellObserver {
22 public: 22 public:
23 explicit TrayCast(SystemTray* system_tray); 23 explicit TrayCast(SystemTray* system_tray);
24 ~TrayCast() override; 24 ~TrayCast() override;
25 25
26 private: 26 private:
27 // Helper/utility methods for testing.
28 friend class TrayCastTestAPI;
29 void StartCastForTest(const std::string& receiver_id);
30 void StopCastForTest();
31 views::View* default_view();
oshima 2015/07/21 21:04:08 GetDefaultView() make it const / const if possibl
jdufault 2015/07/21 21:18:10 Done.
32 enum ChildViewId { TRAY_VIEW = 1, SELECT_VIEW, CAST_VIEW };
33
27 // Overridden from SystemTrayItem. 34 // Overridden from SystemTrayItem.
28 views::View* CreateTrayView(user::LoginStatus status) override; 35 views::View* CreateTrayView(user::LoginStatus status) override;
29 views::View* CreateDefaultView(user::LoginStatus status) override; 36 views::View* CreateDefaultView(user::LoginStatus status) override;
30 views::View* CreateDetailedView(user::LoginStatus status) override; 37 views::View* CreateDetailedView(user::LoginStatus status) override;
31 void DestroyTrayView() override; 38 void DestroyTrayView() override;
32 void DestroyDefaultView() override; 39 void DestroyDefaultView() override;
33 void DestroyDetailedView() override; 40 void DestroyDetailedView() override;
34 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override; 41 void UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) override;
35 42
36 // Overridden from ShellObserver. 43 // Overridden from ShellObserver.
(...skipping 23 matching lines...) Expand all
60 bool has_cast_receivers_ = false; 67 bool has_cast_receivers_ = false;
61 bool is_casting_ = false; 68 bool is_casting_ = false;
62 base::WeakPtrFactory<TrayCast> weak_ptr_factory_; 69 base::WeakPtrFactory<TrayCast> weak_ptr_factory_;
63 70
64 DISALLOW_COPY_AND_ASSIGN(TrayCast); 71 DISALLOW_COPY_AND_ASSIGN(TrayCast);
65 }; 72 };
66 73
67 } // namespace ash 74 } // namespace ash
68 75
69 #endif // ASH_SYSTEM_CAST_TRAY_CAST_H_ 76 #endif // ASH_SYSTEM_CAST_TRAY_CAST_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/system/cast/tray_cast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698