| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 } | 143 } |
| 130 | 144 |
| 131 ash::AccessibilityDelegate* ShellDelegateImpl::CreateAccessibilityDelegate() { | 145 ash::AccessibilityDelegate* ShellDelegateImpl::CreateAccessibilityDelegate() { |
| 132 return new internal::DefaultAccessibilityDelegate; | 146 return new internal::DefaultAccessibilityDelegate; |
| 133 } | 147 } |
| 134 | 148 |
| 135 ash::NewWindowDelegate* ShellDelegateImpl::CreateNewWindowDelegate() { | 149 ash::NewWindowDelegate* ShellDelegateImpl::CreateNewWindowDelegate() { |
| 136 return new NewWindowDelegateImpl; | 150 return new NewWindowDelegateImpl; |
| 137 } | 151 } |
| 138 | 152 |
| 153 ash::MediaDelegate* ShellDelegateImpl::CreateMediaDelegate() { |
| 154 return new MediaDelegateImpl; |
| 155 } |
| 156 |
| 139 aura::client::UserActionClient* ShellDelegateImpl::CreateUserActionClient() { | 157 aura::client::UserActionClient* ShellDelegateImpl::CreateUserActionClient() { |
| 140 return NULL; | 158 return NULL; |
| 141 } | 159 } |
| 142 | 160 |
| 143 void ShellDelegateImpl::RecordUserMetricsAction(UserMetricsAction action) { | 161 void ShellDelegateImpl::RecordUserMetricsAction(UserMetricsAction action) { |
| 144 } | 162 } |
| 145 | 163 |
| 146 void ShellDelegateImpl::HandleMediaNextTrack() { | |
| 147 } | |
| 148 | |
| 149 void ShellDelegateImpl::HandleMediaPlayPause() { | |
| 150 } | |
| 151 | |
| 152 void ShellDelegateImpl::HandleMediaPrevTrack() { | |
| 153 } | |
| 154 | |
| 155 ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::Window* root) { | 164 ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::Window* root) { |
| 156 return new ContextMenu(root); | 165 return new ContextMenu(root); |
| 157 } | 166 } |
| 158 | 167 |
| 159 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { | 168 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { |
| 160 return RootWindowHostFactory::Create(); | 169 return RootWindowHostFactory::Create(); |
| 161 } | 170 } |
| 162 | 171 |
| 163 base::string16 ShellDelegateImpl::GetProductName() const { | 172 base::string16 ShellDelegateImpl::GetProductName() const { |
| 164 return base::string16(); | 173 return base::string16(); |
| 165 } | 174 } |
| 166 | 175 |
| 167 } // namespace shell | 176 } // namespace shell |
| 168 } // namespace ash | 177 } // namespace ash |
| OLD | NEW |