| Index: chrome/browser/extensions/api/tab_capture/tab_capture_event_router.h
|
| diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_event_router.h b/chrome/browser/extensions/api/tab_capture/tab_capture_event_router.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2ed95161383899b839bc6fbabdb68d102a1a50f1
|
| --- /dev/null
|
| +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_event_router.h
|
| @@ -0,0 +1,43 @@
|
| +// 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 CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_EVENT_ROUTER_H_
|
| +#define CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_EVENT_ROUTER_H_
|
| +
|
| +#include <map>
|
| +
|
| +#include "base/string16.h"
|
| +#include "chrome/browser/media/media_internals.h"
|
| +#include "chrome/browser/media/media_internals_observer.h"
|
| +#include "chrome/common/extensions/api/experimental_tab_capture.h"
|
| +#include "content/public/common/media_stream_request.h"
|
| +
|
| +class Profile;
|
| +
|
| +namespace extensions {
|
| +
|
| +namespace tab_capture = extensions::api::experimental_tab_capture;
|
| +
|
| +class TabCaptureEventRouter : public MediaInternalsObserver {
|
| + public:
|
| + explicit TabCaptureEventRouter(Profile* profile);
|
| + virtual ~TabCaptureEventRouter();
|
| +
|
| + std::map<int, tab_capture::TabCaptureState> GetCapturedTabs();
|
| +
|
| + private:
|
| + // MediaInternalsObserver.
|
| + virtual void OnRequestUpdate(
|
| + const content::MediaStreamDevice& device,
|
| + const content::MediaStreamRequest::RequestState state) OVERRIDE;
|
| +
|
| + Profile* const profile_;
|
| + std::map<int, tab_capture::TabCaptureState> requests_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(TabCaptureEventRouter);
|
| +};
|
| +
|
| +} // namespace extension
|
| +
|
| +#endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_EVENT_ROUTER_H_
|
|
|