Chromium Code Reviews| 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/shell/shell_delegate_impl.h" | 5 #include "ash/shell/shell_delegate_impl.h" |
| 6 | 6 |
| 7 #include "ash/shell/example_factory.h" | 7 #include "ash/shell/example_factory.h" |
| 8 #include "ash/shell/launcher_delegate_impl.h" | 8 #include "ash/shell/launcher_delegate_impl.h" |
| 9 #include "ash/shell/toplevel_window.h" | 9 #include "ash/shell/toplevel_window.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| 11 #include "ash/wm/partial_screenshot_view.h" | 11 #include "ash/wm/partial_screenshot_view.h" |
| 12 #include "base/message_loop.h" | 12 #include "base/message_loop.h" |
| 13 #include "ui/aura/window.h" | 13 #include "ui/aura/window.h" |
| 14 | 14 |
| 15 namespace ash { | 15 namespace ash { |
| 16 namespace shell { | 16 namespace shell { |
| 17 | 17 |
| 18 ShellDelegateImpl::ShellDelegateImpl() | 18 ShellDelegateImpl::ShellDelegateImpl() |
| 19 : watcher_(NULL), | 19 : watcher_(NULL), |
| 20 launcher_delegate_(NULL), | 20 launcher_delegate_(NULL), |
| 21 locked_(false) { | 21 locked_(false), |
| 22 spoken_feedback_enabled_(false) { | |
| 22 } | 23 } |
| 23 | 24 |
| 24 ShellDelegateImpl::~ShellDelegateImpl() { | 25 ShellDelegateImpl::~ShellDelegateImpl() { |
| 25 } | 26 } |
| 26 | 27 |
| 27 void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) { | 28 void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) { |
| 28 watcher_ = watcher; | 29 watcher_ = watcher; |
| 29 if (launcher_delegate_) | 30 if (launcher_delegate_) |
| 30 launcher_delegate_->set_watcher(watcher); | 31 launcher_delegate_->set_watcher(watcher); |
| 31 } | 32 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 } | 87 } |
| 87 | 88 |
| 88 void ShellDelegateImpl::ShowTaskManager() { | 89 void ShellDelegateImpl::ShowTaskManager() { |
| 89 } | 90 } |
| 90 | 91 |
| 91 content::BrowserContext* ShellDelegateImpl::GetCurrentBrowserContext() { | 92 content::BrowserContext* ShellDelegateImpl::GetCurrentBrowserContext() { |
| 92 return Shell::GetInstance()->browser_context(); | 93 return Shell::GetInstance()->browser_context(); |
| 93 } | 94 } |
| 94 | 95 |
| 95 void ShellDelegateImpl::ToggleSpokenFeedback() { | 96 void ShellDelegateImpl::ToggleSpokenFeedback() { |
| 97 spoken_feedback_enabled_ = !spoken_feedback_enabled_; | |
|
dmazzoni
2012/06/14 16:45:25
This worries me slightly, I'm afraid it could get
Yusuke Sato
2012/06/14 16:57:15
If I understand correctly, ash/shell/* files are j
dmazzoni
2012/06/14 17:05:00
Ah! Thanks, I didn't realize that. Looks good.
-
| |
| 98 } | |
| 99 | |
| 100 bool ShellDelegateImpl::IsSpokenFeedbackEnabled() const { | |
| 101 return spoken_feedback_enabled_; | |
| 96 } | 102 } |
| 97 | 103 |
| 98 app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() { | 104 app_list::AppListViewDelegate* ShellDelegateImpl::CreateAppListViewDelegate() { |
| 99 return ash::shell::CreateAppListViewDelegate(); | 105 return ash::shell::CreateAppListViewDelegate(); |
| 100 } | 106 } |
| 101 | 107 |
| 102 void ShellDelegateImpl::StartPartialScreenshot( | 108 void ShellDelegateImpl::StartPartialScreenshot( |
| 103 ash::ScreenshotDelegate* screenshot_delegate) { | 109 ash::ScreenshotDelegate* screenshot_delegate) { |
| 104 ash::PartialScreenshotView::StartPartialScreenshot(screenshot_delegate); | 110 ash::PartialScreenshotView::StartPartialScreenshot(screenshot_delegate); |
| 105 } | 111 } |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 117 | 123 |
| 118 ash::UserWallpaperDelegate* ShellDelegateImpl::CreateUserWallpaperDelegate() { | 124 ash::UserWallpaperDelegate* ShellDelegateImpl::CreateUserWallpaperDelegate() { |
| 119 return NULL; | 125 return NULL; |
| 120 } | 126 } |
| 121 aura::client::UserActionClient* ShellDelegateImpl::CreateUserActionClient() { | 127 aura::client::UserActionClient* ShellDelegateImpl::CreateUserActionClient() { |
| 122 return NULL; | 128 return NULL; |
| 123 } | 129 } |
| 124 | 130 |
| 125 } // namespace shell | 131 } // namespace shell |
| 126 } // namespace ash | 132 } // namespace ash |
| OLD | NEW |