forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Media device notification to SystemMonitor and Mac impl
BUG=110400 TEST=run chrome with -v=1, attach and a mass storage media device and observe the log entries for the attach and detach events. Review URL: https://chromiumcodereview.appspot.com/9363008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124288 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
vandebo@chromium.org
committed
Feb 29, 2012
1 parent
95c7965
commit c2cab55
Showing
12 changed files
with
300 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) 2012 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "base/test/mock_devices_changed_observer.h" | ||
|
||
#include "base/file_path.h" | ||
|
||
namespace base { | ||
|
||
MockDevicesChangedObserver::MockDevicesChangedObserver() { | ||
} | ||
|
||
MockDevicesChangedObserver::~MockDevicesChangedObserver() { | ||
} | ||
|
||
} // namespace base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (c) 2012 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef BASE_TEST_MOCK_DEVICES_CHANGED_OBSERVER_H_ | ||
#define BASE_TEST_MOCK_DEVICES_CHANGED_OBSERVER_H_ | ||
|
||
#include <string> | ||
|
||
#include "base/system_monitor/system_monitor.h" | ||
#include "testing/gmock/include/gmock/gmock.h" | ||
|
||
class FilePath; | ||
|
||
namespace base { | ||
|
||
class MockDevicesChangedObserver | ||
: public base::SystemMonitor::DevicesChangedObserver { | ||
public: | ||
MockDevicesChangedObserver(); | ||
~MockDevicesChangedObserver(); | ||
|
||
MOCK_METHOD0(OnDevicesChanged, void()); | ||
MOCK_METHOD3(OnMediaDeviceAttached, | ||
void(const base::SystemMonitor::DeviceIdType& id, | ||
const std::string& name, | ||
const FilePath& path)); | ||
MOCK_METHOD1(OnMediaDeviceDetached, | ||
void(const base::SystemMonitor::DeviceIdType& id)); | ||
|
||
DISALLOW_COPY_AND_ASSIGN(MockDevicesChangedObserver); | ||
}; | ||
|
||
} // namespace base | ||
|
||
#endif // BASE_TEST_MOCK_DEVICES_CHANGED_OBSERVER_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) 2012 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef CONTENT_BROWSER_MAC_MEDIA_DEVICE_NOTIFICATIONS_H_ | ||
#define CONTENT_BROWSER_MAC_MEDIA_DEVICE_NOTIFICATIONS_H_ | ||
#pragma once | ||
|
||
namespace content { | ||
|
||
void StartMediaDeviceNotifications(); | ||
|
||
} // namespace content | ||
|
||
#endif // CONTENT_BROWSER_MAC_MEDIA_DEVICE_NOTIFICATIONS_H_ |
Oops, something went wrong.