| 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 "content/browser/system_message_window_win.h" | 5 #include "content/browser/system_message_window_win.h" |
| 6 | 6 |
| 7 #include <dbt.h> | 7 #include <dbt.h> |
| 8 #include <ks.h> | 8 #include <ks.h> |
| 9 #include <ksmedia.h> | 9 #include <ksmedia.h> |
| 10 | 10 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/system_monitor/system_monitor.h" | 12 #include "base/system_monitor/system_monitor.h" |
| 13 #include "base/win/wrapped_window_proc.h" | 13 #include "base/win/wrapped_window_proc.h" |
| 14 | 14 |
| 15 namespace content { |
| 16 |
| 15 namespace { | 17 namespace { |
| 16 const wchar_t kWindowClassName[] = L"Chrome_SystemMessageWindow"; | 18 const wchar_t kWindowClassName[] = L"Chrome_SystemMessageWindow"; |
| 17 | 19 |
| 18 // A static map from a device category guid to base::SystemMonitor::DeviceType. | 20 // A static map from a device category guid to base::SystemMonitor::DeviceType. |
| 19 struct { | 21 struct { |
| 20 const GUID device_category; | 22 const GUID device_category; |
| 21 const base::SystemMonitor::DeviceType device_type; | 23 const base::SystemMonitor::DeviceType device_type; |
| 22 } const kDeviceCategoryMap[] = { | 24 } const kDeviceCategoryMap[] = { |
| 23 { KSCATEGORY_AUDIO, base::SystemMonitor::DEVTYPE_AUDIO_CAPTURE }, | 25 { KSCATEGORY_AUDIO, base::SystemMonitor::DEVTYPE_AUDIO_CAPTURE }, |
| 24 { KSCATEGORY_VIDEO, base::SystemMonitor::DEVTYPE_VIDEO_CAPTURE }, | 26 { KSCATEGORY_VIDEO, base::SystemMonitor::DEVTYPE_VIDEO_CAPTURE }, |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 WPARAM wparam, LPARAM lparam) { | 144 WPARAM wparam, LPARAM lparam) { |
| 143 switch (message) { | 145 switch (message) { |
| 144 case WM_DEVICECHANGE: | 146 case WM_DEVICECHANGE: |
| 145 return OnDeviceChange(static_cast<UINT>(wparam), lparam); | 147 return OnDeviceChange(static_cast<UINT>(wparam), lparam); |
| 146 default: | 148 default: |
| 147 break; | 149 break; |
| 148 } | 150 } |
| 149 | 151 |
| 150 return ::DefWindowProc(hwnd, message, wparam, lparam); | 152 return ::DefWindowProc(hwnd, message, wparam, lparam); |
| 151 } | 153 } |
| 154 |
| 155 } // namespace content |
| OLD | NEW |