| OLD | NEW |
| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/screenshot_delegate.h" | 9 #include "ash/screenshot_delegate.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| 11 #include "ash/shell_window_ids.h" | 11 #include "ash/shell_window_ids.h" |
| 12 #include "ash/test/test_launcher_delegate.h" | 12 #include "ash/test/test_launcher_delegate.h" |
| 13 #include "content/public/test/test_browser_context.h" | 13 #include "content/public/test/test_browser_context.h" |
| 14 #include "grit/ui_resources.h" | 14 #include "grit/ui_resources.h" |
| 15 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
| 16 | 16 |
| 17 namespace ash { | 17 namespace ash { |
| 18 namespace test { | 18 namespace test { |
| 19 | 19 |
| 20 TestShellDelegate::TestShellDelegate() : locked_(false) { | 20 TestShellDelegate::TestShellDelegate() |
| 21 : locked_(false), |
| 22 spoken_feedback_enabled_(false) { |
| 21 } | 23 } |
| 22 | 24 |
| 23 TestShellDelegate::~TestShellDelegate() { | 25 TestShellDelegate::~TestShellDelegate() { |
| 24 } | 26 } |
| 25 | 27 |
| 26 bool TestShellDelegate::IsUserLoggedIn() { | 28 bool TestShellDelegate::IsUserLoggedIn() { |
| 27 return true; | 29 return true; |
| 28 } | 30 } |
| 29 | 31 |
| 30 void TestShellDelegate::LockScreen() { | 32 void TestShellDelegate::LockScreen() { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 } | 73 } |
| 72 | 74 |
| 73 void TestShellDelegate::ShowTaskManager() { | 75 void TestShellDelegate::ShowTaskManager() { |
| 74 } | 76 } |
| 75 | 77 |
| 76 content::BrowserContext* TestShellDelegate::GetCurrentBrowserContext() { | 78 content::BrowserContext* TestShellDelegate::GetCurrentBrowserContext() { |
| 77 return new content::TestBrowserContext(); | 79 return new content::TestBrowserContext(); |
| 78 } | 80 } |
| 79 | 81 |
| 80 void TestShellDelegate::ToggleSpokenFeedback() { | 82 void TestShellDelegate::ToggleSpokenFeedback() { |
| 83 spoken_feedback_enabled_ = !spoken_feedback_enabled_; |
| 84 } |
| 85 |
| 86 bool TestShellDelegate::IsSpokenFeedbackEnabled() const { |
| 87 return spoken_feedback_enabled_; |
| 81 } | 88 } |
| 82 | 89 |
| 83 app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { | 90 app_list::AppListViewDelegate* TestShellDelegate::CreateAppListViewDelegate() { |
| 84 return NULL; | 91 return NULL; |
| 85 } | 92 } |
| 86 | 93 |
| 87 void TestShellDelegate::StartPartialScreenshot( | 94 void TestShellDelegate::StartPartialScreenshot( |
| 88 ScreenshotDelegate* screenshot_delegate) { | 95 ScreenshotDelegate* screenshot_delegate) { |
| 89 if (screenshot_delegate) | 96 if (screenshot_delegate) |
| 90 screenshot_delegate->HandleTakePartialScreenshot(NULL, gfx::Rect()); | 97 screenshot_delegate->HandleTakePartialScreenshot(NULL, gfx::Rect()); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 103 UserWallpaperDelegate* TestShellDelegate::CreateUserWallpaperDelegate() { | 110 UserWallpaperDelegate* TestShellDelegate::CreateUserWallpaperDelegate() { |
| 104 return NULL; | 111 return NULL; |
| 105 } | 112 } |
| 106 | 113 |
| 107 aura::client::UserActionClient* TestShellDelegate::CreateUserActionClient() { | 114 aura::client::UserActionClient* TestShellDelegate::CreateUserActionClient() { |
| 108 return NULL; | 115 return NULL; |
| 109 } | 116 } |
| 110 | 117 |
| 111 } // namespace test | 118 } // namespace test |
| 112 } // namespace ash | 119 } // namespace ash |
| OLD | NEW |