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

Side by Side Diff: ash/test/tray_cast_test_api.cc

Issue 2466043002: Cleanup TrayCast with media-router only support in mind. (Closed)
Patch Set: Add TODO Created 4 years, 1 month 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 #include "ash/test/tray_cast_test_api.h" 5 #include "ash/test/tray_cast_test_api.h"
6 6
7 #include "ash/common/cast_config_delegate.h" 7 #include "ash/common/cast_config_delegate.h"
8 #include "ash/common/system/tray/system_tray.h" 8 #include "ash/common/system/tray/system_tray.h"
9 #include "ash/common/system/tray/system_tray_delegate.h" 9 #include "ash/common/system/tray/system_tray_delegate.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 void TrayCastTestAPI::StopCast() { 43 void TrayCastTestAPI::StopCast() {
44 return tray_cast_->StopCastForTest(); 44 return tray_cast_->StopCastForTest();
45 } 45 }
46 46
47 void TrayCastTestAPI::OnCastingSessionStartedOrStopped(bool is_casting) { 47 void TrayCastTestAPI::OnCastingSessionStartedOrStopped(bool is_casting) {
48 tray_cast_->OnCastingSessionStartedOrStopped(is_casting); 48 tray_cast_->OnCastingSessionStartedOrStopped(is_casting);
49 } 49 }
50 50
51 void TrayCastTestAPI::ReleaseConfigCallbacks() { 51 void TrayCastTestAPI::ReleaseConfigCallbacks() {
52 tray_cast_->added_observer_ = false;
53
54 if (WmShell::Get() && WmShell::Get()->system_tray_delegate()) { 52 if (WmShell::Get() && WmShell::Get()->system_tray_delegate()) {
55 WmShell::Get() 53 WmShell::Get()
56 ->system_tray_delegate() 54 ->system_tray_delegate()
57 ->GetCastConfigDelegate() 55 ->GetCastConfigDelegate()
58 ->RemoveObserver(tray_cast_); 56 ->RemoveObserver(tray_cast_);
59 } 57 }
60 } 58 }
61 59
62 bool TrayCastTestAPI::IsViewDrawn(TrayCast::ChildViewId id) const { 60 bool TrayCastTestAPI::IsViewDrawn(TrayCast::ChildViewId id) const {
63 const views::View* view = tray_cast_->GetDefaultView()->GetViewByID(id); 61 const views::View* view = tray_cast_->GetDefaultView()->GetViewByID(id);
64 return view != nullptr && view->IsDrawn(); 62 return view != nullptr && view->IsDrawn();
65 } 63 }
66 64
67 } // namespace ash 65 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/cast/tray_cast.cc ('k') | chrome/browser/ui/ash/cast_config_delegate_media_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698