Chromium Code Reviews| OLD | NEW |
|---|---|
| 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(); | |
|
achuithb
2015/07/21 19:52:29
You can inline the function here
jdufault
2015/07/21 20:21:31
default_ is an incomplete type, so it cannot be co
jdufault
2015/07/21 20:22:24
Oops, old comment. I converted the type using a ca
achuithb
2015/07/21 20:30:17
I'm really sorry, but I didn't expect there would
jdufault
2015/07/21 20:48:53
No worries, I've moved it back to the cc file.
No
| |
| 32 enum ChildViewIds { TRAY_VIEW = 1, SELECT_VIEW, CAST_VIEW }; | |
|
achuithb
2015/07/21 19:52:29
ChildViewId?
jdufault
2015/07/21 20:21:31
Done.
| |
| 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 Loading... | |
| 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_ |
| OLD | NEW |