| 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 <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "ash/caps_lock_delegate_stub.h" | 9 #include "ash/caps_lock_delegate_stub.h" |
| 10 #include "ash/default_accessibility_delegate.h" | 10 #include "ash/default_accessibility_delegate.h" |
| 11 #include "ash/host/root_window_host_factory.h" | 11 #include "ash/host/root_window_host_factory.h" |
| 12 #include "ash/keyboard_controller_proxy_stub.h" | 12 #include "ash/keyboard_controller_proxy_stub.h" |
| 13 #include "ash/session_state_delegate.h" | 13 #include "ash/session_state_delegate.h" |
| 14 #include "ash/shell.h" | 14 #include "ash/shell.h" |
| 15 #include "ash/shell_window_ids.h" | 15 #include "ash/shell_window_ids.h" |
| 16 #include "ash/test/test_launcher_delegate.h" | 16 #include "ash/test/test_launcher_delegate.h" |
| 17 #include "ash/test/test_session_state_delegate.h" | 17 #include "ash/test/test_session_state_delegate.h" |
| 18 #include "ash/test/test_system_tray_delegate.h" | 18 #include "ash/test/test_system_tray_delegate.h" |
| 19 #include "ash/test/test_user_wallpaper_delegate.h" | 19 #include "ash/test/test_user_wallpaper_delegate.h" |
| 20 #include "ash/wm/window_state.h" | 20 #include "ash/wm/window_state.h" |
| 21 #include "ash/wm/window_util.h" | 21 #include "ash/wm/window_util.h" |
| 22 #include "base/logging.h" | 22 #include "base/logging.h" |
| 23 #include "content/public/test/test_browser_context.h" | 23 #include "content/public/test/test_browser_context.h" |
| 24 #include "ui/aura/window.h" | 24 #include "ui/aura/window.h" |
| 25 #include "ui/compositor/compositor.h" | 25 #include "ui/compositor/test/context_factories_for_test.h" |
| 26 | 26 |
| 27 namespace ash { | 27 namespace ash { |
| 28 namespace test { | 28 namespace test { |
| 29 | 29 |
| 30 TestShellDelegate::TestShellDelegate() | 30 TestShellDelegate::TestShellDelegate() |
| 31 : num_exit_requests_(0), | 31 : num_exit_requests_(0), |
| 32 multi_profiles_enabled_(false), | 32 multi_profiles_enabled_(false), |
| 33 test_session_state_delegate_(NULL) { | 33 test_session_state_delegate_(NULL) { |
| 34 } | 34 } |
| 35 | 35 |
| 36 TestShellDelegate::~TestShellDelegate() { | 36 TestShellDelegate::~TestShellDelegate() { |
| 37 ui::TerminateContextFactoryForTests(); |
| 37 } | 38 } |
| 38 | 39 |
| 39 bool TestShellDelegate::IsFirstRunAfterBoot() const { | 40 bool TestShellDelegate::IsFirstRunAfterBoot() const { |
| 40 return false; | 41 return false; |
| 41 } | 42 } |
| 42 | 43 |
| 43 bool TestShellDelegate::IsMultiProfilesEnabled() const { | 44 bool TestShellDelegate::IsMultiProfilesEnabled() const { |
| 44 return multi_profiles_enabled_; | 45 return multi_profiles_enabled_; |
| 45 } | 46 } |
| 46 | 47 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 void TestShellDelegate::HandleMediaPrevTrack() { | 143 void TestShellDelegate::HandleMediaPrevTrack() { |
| 143 } | 144 } |
| 144 | 145 |
| 145 ui::MenuModel* TestShellDelegate::CreateContextMenu(aura::RootWindow* root) { | 146 ui::MenuModel* TestShellDelegate::CreateContextMenu(aura::RootWindow* root) { |
| 146 return NULL; | 147 return NULL; |
| 147 } | 148 } |
| 148 | 149 |
| 149 RootWindowHostFactory* TestShellDelegate::CreateRootWindowHostFactory() { | 150 RootWindowHostFactory* TestShellDelegate::CreateRootWindowHostFactory() { |
| 150 // The ContextFactory must exist before any Compositors are created. | 151 // The ContextFactory must exist before any Compositors are created. |
| 151 bool allow_test_contexts = true; | 152 bool allow_test_contexts = true; |
| 152 ui::Compositor::InitializeContextFactoryForTests(allow_test_contexts); | 153 ui::InitializeContextFactoryForTests(allow_test_contexts); |
| 153 | 154 |
| 154 return RootWindowHostFactory::Create(); | 155 return RootWindowHostFactory::Create(); |
| 155 } | 156 } |
| 156 | 157 |
| 157 base::string16 TestShellDelegate::GetProductName() const { | 158 base::string16 TestShellDelegate::GetProductName() const { |
| 158 return base::string16(); | 159 return base::string16(); |
| 159 } | 160 } |
| 160 | 161 |
| 161 TestSessionStateDelegate* TestShellDelegate::test_session_state_delegate() { | 162 TestSessionStateDelegate* TestShellDelegate::test_session_state_delegate() { |
| 162 return test_session_state_delegate_; | 163 return test_session_state_delegate_; |
| 163 } | 164 } |
| 164 | 165 |
| 165 } // namespace test | 166 } // namespace test |
| 166 } // namespace ash | 167 } // namespace ash |
| OLD | NEW |