| 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/accessibility_delegate.h" | 7 #include "ash/accessibility_delegate.h" |
| 8 #include "ash/caps_lock_delegate_stub.h" | 8 #include "ash/caps_lock_delegate_stub.h" |
| 9 #include "ash/default_accessibility_delegate.h" | 9 #include "ash/default_accessibility_delegate.h" |
| 10 #include "ash/default_user_wallpaper_delegate.h" | 10 #include "ash/default_user_wallpaper_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/media_delegate.h" |
| 13 #include "ash/new_window_delegate.h" | 14 #include "ash/new_window_delegate.h" |
| 14 #include "ash/session_state_delegate.h" | 15 #include "ash/session_state_delegate.h" |
| 15 #include "ash/session_state_delegate_stub.h" | 16 #include "ash/session_state_delegate_stub.h" |
| 16 #include "ash/shell/context_menu.h" | 17 #include "ash/shell/context_menu.h" |
| 17 #include "ash/shell/example_factory.h" | 18 #include "ash/shell/example_factory.h" |
| 18 #include "ash/shell/launcher_delegate_impl.h" | 19 #include "ash/shell/launcher_delegate_impl.h" |
| 19 #include "ash/shell/toplevel_window.h" | 20 #include "ash/shell/toplevel_window.h" |
| 20 #include "ash/shell_window_ids.h" | 21 #include "ash/shell_window_ids.h" |
| 21 #include "ash/system/tray/default_system_tray_delegate.h" | 22 #include "ash/system/tray/default_system_tray_delegate.h" |
| 22 #include "ash/wm/window_state.h" | 23 #include "ash/wm/window_state.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 44 virtual void OpenCrosh() OVERRIDE {} | 45 virtual void OpenCrosh() OVERRIDE {} |
| 45 virtual void RestoreTab() OVERRIDE {} | 46 virtual void RestoreTab() OVERRIDE {} |
| 46 virtual void ShowKeyboardOverlay() OVERRIDE {} | 47 virtual void ShowKeyboardOverlay() OVERRIDE {} |
| 47 virtual void ShowTaskManager() OVERRIDE {} | 48 virtual void ShowTaskManager() OVERRIDE {} |
| 48 virtual void OpenFeedbackPage() OVERRIDE {} | 49 virtual void OpenFeedbackPage() OVERRIDE {} |
| 49 | 50 |
| 50 private: | 51 private: |
| 51 DISALLOW_COPY_AND_ASSIGN(NewWindowDelegateImpl); | 52 DISALLOW_COPY_AND_ASSIGN(NewWindowDelegateImpl); |
| 52 }; | 53 }; |
| 53 | 54 |
| 55 class MediaDelegateImpl : public MediaDelegate { |
| 56 public: |
| 57 MediaDelegateImpl() {} |
| 58 virtual ~MediaDelegateImpl() {} |
| 59 |
| 60 virtual void HandleMediaNextTrack() OVERRIDE {} |
| 61 virtual void HandleMediaPlayPause() OVERRIDE {} |
| 62 virtual void HandleMediaPrevTrack() OVERRIDE {} |
| 63 |
| 64 private: |
| 65 DISALLOW_COPY_AND_ASSIGN(MediaDelegateImpl); |
| 66 }; |
| 67 |
| 54 } // namespace | 68 } // namespace |
| 55 | 69 |
| 56 ShellDelegateImpl::ShellDelegateImpl() | 70 ShellDelegateImpl::ShellDelegateImpl() |
| 57 : watcher_(NULL), | 71 : watcher_(NULL), |
| 58 launcher_delegate_(NULL) { | 72 launcher_delegate_(NULL) { |
| 59 } | 73 } |
| 60 | 74 |
| 61 ShellDelegateImpl::~ShellDelegateImpl() { | 75 ShellDelegateImpl::~ShellDelegateImpl() { |
| 62 } | 76 } |
| 63 | 77 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 146 } |
| 133 | 147 |
| 134 ash::AccessibilityDelegate* ShellDelegateImpl::CreateAccessibilityDelegate() { | 148 ash::AccessibilityDelegate* ShellDelegateImpl::CreateAccessibilityDelegate() { |
| 135 return new internal::DefaultAccessibilityDelegate; | 149 return new internal::DefaultAccessibilityDelegate; |
| 136 } | 150 } |
| 137 | 151 |
| 138 ash::NewWindowDelegate* ShellDelegateImpl::CreateNewWindowDelegate() { | 152 ash::NewWindowDelegate* ShellDelegateImpl::CreateNewWindowDelegate() { |
| 139 return new NewWindowDelegateImpl; | 153 return new NewWindowDelegateImpl; |
| 140 } | 154 } |
| 141 | 155 |
| 156 ash::MediaDelegate* ShellDelegateImpl::CreateMediaDelegate() { |
| 157 return new MediaDelegateImpl; |
| 158 } |
| 159 |
| 142 aura::client::UserActionClient* ShellDelegateImpl::CreateUserActionClient() { | 160 aura::client::UserActionClient* ShellDelegateImpl::CreateUserActionClient() { |
| 143 return NULL; | 161 return NULL; |
| 144 } | 162 } |
| 145 | 163 |
| 146 void ShellDelegateImpl::RecordUserMetricsAction(UserMetricsAction action) { | 164 void ShellDelegateImpl::RecordUserMetricsAction(UserMetricsAction action) { |
| 147 } | 165 } |
| 148 | 166 |
| 149 void ShellDelegateImpl::HandleMediaNextTrack() { | |
| 150 } | |
| 151 | |
| 152 void ShellDelegateImpl::HandleMediaPlayPause() { | |
| 153 } | |
| 154 | |
| 155 void ShellDelegateImpl::HandleMediaPrevTrack() { | |
| 156 } | |
| 157 | |
| 158 ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::Window* root) { | 167 ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::Window* root) { |
| 159 return new ContextMenu(root); | 168 return new ContextMenu(root); |
| 160 } | 169 } |
| 161 | 170 |
| 162 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { | 171 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { |
| 163 return RootWindowHostFactory::Create(); | 172 return RootWindowHostFactory::Create(); |
| 164 } | 173 } |
| 165 | 174 |
| 166 base::string16 ShellDelegateImpl::GetProductName() const { | 175 base::string16 ShellDelegateImpl::GetProductName() const { |
| 167 return base::string16(); | 176 return base::string16(); |
| 168 } | 177 } |
| 169 | 178 |
| 170 } // namespace shell | 179 } // namespace shell |
| 171 } // namespace ash | 180 } // namespace ash |
| OLD | NEW |