Chromium Code Reviews| 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..ea53f8a95f70f6242fd802c0d051eb55234db894 |
| --- /dev/null |
| +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_event_router.h |
| @@ -0,0 +1,47 @@ |
| +// 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 { |
|
Aaron Boodman
2012/10/04 07:21:43
You will be the first to do this (sorry), but can
justinlin
2012/10/08 09:58:31
Done.
|
| + public: |
| + explicit TabCaptureEventRouter(Profile* profile); |
| + virtual ~TabCaptureEventRouter(); |
| + |
| + std::map<int, tab_capture::TabCaptureState> GetCapturedTabs(); |
|
Alpha Left Google
2012/10/04 20:52:01
Use a typedef for this map.
justinlin
2012/10/08 09:58:31
Done.
|
| + |
| + private: |
| + // MediaInternalsObserver. |
| + virtual void OnRequestUpdate( |
| + const content::MediaStreamDevice& device, |
| + const content::MediaStreamRequest::RequestState state) OVERRIDE; |
| + |
| + void HandleRequestUpdate( |
| + const content::MediaStreamDevice& device, |
| + const content::MediaStreamRequest::RequestState state); |
| + |
| + Profile* const profile_; |
| + std::map<int, tab_capture::TabCaptureState> requests_; |
|
Alpha Left Google
2012/10/04 20:52:01
Use typedef.
justinlin
2012/10/08 09:58:31
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(TabCaptureEventRouter); |
| +}; |
| + |
| +} // namespace extension |
| + |
| +#endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_EVENT_ROUTER_H_ |