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

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

Issue 2098023002: mash: Migrate remaining tray observers and notify functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/test_shell_delegate.h" 5 #include "ash/test/test_shell_delegate.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "ash/app_list/app_list_presenter_delegate.h" 9 #include "ash/app_list/app_list_presenter_delegate.h"
10 #include "ash/app_list/app_list_presenter_delegate_factory.h" 10 #include "ash/app_list/app_list_presenter_delegate_factory.h"
11 #include "ash/common/default_accessibility_delegate.h" 11 #include "ash/common/default_accessibility_delegate.h"
12 #include "ash/common/session/session_state_delegate.h" 12 #include "ash/common/session/session_state_delegate.h"
13 #include "ash/common/shell_window_ids.h" 13 #include "ash/common/shell_window_ids.h"
14 #include "ash/common/wm/window_state.h" 14 #include "ash/common/wm/window_state.h"
15 #include "ash/common/wm_shell.h"
15 #include "ash/gpu_support_stub.h" 16 #include "ash/gpu_support_stub.h"
16 #include "ash/media_delegate.h" 17 #include "ash/media_delegate.h"
17 #include "ash/new_window_delegate.h" 18 #include "ash/new_window_delegate.h"
18 #include "ash/pointer_watcher_delegate_aura.h" 19 #include "ash/pointer_watcher_delegate_aura.h"
19 #include "ash/shell.h" 20 #include "ash/shell.h"
20 #include "ash/test/test_keyboard_ui.h" 21 #include "ash/test/test_keyboard_ui.h"
21 #include "ash/test/test_session_state_delegate.h" 22 #include "ash/test/test_session_state_delegate.h"
22 #include "ash/test/test_shelf_delegate.h" 23 #include "ash/test/test_shelf_delegate.h"
23 #include "ash/test/test_system_tray_delegate.h" 24 #include "ash/test/test_system_tray_delegate.h"
24 #include "ash/test/test_user_wallpaper_delegate.h" 25 #include "ash/test/test_user_wallpaper_delegate.h"
25 #include "ash/wm/window_util.h" 26 #include "ash/wm/window_util.h"
26 #include "base/logging.h" 27 #include "base/logging.h"
27 #include "base/memory/ptr_util.h" 28 #include "base/memory/ptr_util.h"
28 #include "ui/app_list/presenter/app_list_presenter_impl.h" 29 #include "ui/app_list/presenter/app_list_presenter_impl.h"
29 #include "ui/app_list/presenter/app_list_view_delegate_factory.h" 30 #include "ui/app_list/presenter/app_list_view_delegate_factory.h"
30 #include "ui/app_list/test/app_list_test_view_delegate.h" 31 #include "ui/app_list/test/app_list_test_view_delegate.h"
31 #include "ui/aura/window.h" 32 #include "ui/aura/window.h"
32 #include "ui/gfx/image/image.h" 33 #include "ui/gfx/image/image.h"
33 34
34 #if defined(OS_CHROMEOS) 35 #if defined(OS_CHROMEOS)
35 #include "ash/system/tray/system_tray_notifier.h" 36 #include "ash/common/system/tray/system_tray_notifier.h"
36 #endif 37 #endif
37 38
38 namespace ash { 39 namespace ash {
39 namespace test { 40 namespace test {
40 namespace { 41 namespace {
41 42
42 class NewWindowDelegateImpl : public NewWindowDelegate { 43 class NewWindowDelegateImpl : public NewWindowDelegate {
43 public: 44 public:
44 NewWindowDelegateImpl() {} 45 NewWindowDelegateImpl() {}
45 ~NewWindowDelegateImpl() override {} 46 ~NewWindowDelegateImpl() override {}
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 base::string16 TestShellDelegate::GetProductName() const { 224 base::string16 TestShellDelegate::GetProductName() const {
224 return base::string16(); 225 return base::string16();
225 } 226 }
226 227
227 gfx::Image TestShellDelegate::GetDeprecatedAcceleratorImage() const { 228 gfx::Image TestShellDelegate::GetDeprecatedAcceleratorImage() const {
228 return gfx::Image(); 229 return gfx::Image();
229 } 230 }
230 231
231 void TestShellDelegate::SetMediaCaptureState(MediaCaptureState state) { 232 void TestShellDelegate::SetMediaCaptureState(MediaCaptureState state) {
232 #if defined(OS_CHROMEOS) 233 #if defined(OS_CHROMEOS)
233 Shell* shell = Shell::GetInstance(); 234 static_cast<MediaDelegateImpl*>(Shell::GetInstance()->media_delegate())
234 static_cast<MediaDelegateImpl*>(shell->media_delegate())
235 ->set_media_capture_state(state); 235 ->set_media_capture_state(state);
236 shell->system_tray_notifier()->NotifyMediaCaptureChanged(); 236 WmShell::Get()->system_tray_notifier()->NotifyMediaCaptureChanged();
237 #endif 237 #endif
238 } 238 }
239 239
240 } // namespace test 240 } // namespace test
241 } // namespace ash 241 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698