Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_EVENT_ROUTER_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_EVENT_ROUTER_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 | |
| 10 #include "base/string16.h" | |
| 11 #include "chrome/browser/media/media_internals.h" | |
| 12 #include "chrome/browser/media/media_internals_observer.h" | |
| 13 #include "chrome/common/extensions/api/experimental_tab_capture.h" | |
| 14 #include "content/public/common/media_stream_request.h" | |
| 15 | |
| 16 class Profile; | |
| 17 | |
| 18 namespace extensions { | |
| 19 | |
| 20 namespace tab_capture = extensions::api::experimental_tab_capture; | |
| 21 | |
| 22 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.
| |
| 23 public: | |
| 24 explicit TabCaptureEventRouter(Profile* profile); | |
| 25 virtual ~TabCaptureEventRouter(); | |
| 26 | |
| 27 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.
| |
| 28 | |
| 29 private: | |
| 30 // MediaInternalsObserver. | |
| 31 virtual void OnRequestUpdate( | |
| 32 const content::MediaStreamDevice& device, | |
| 33 const content::MediaStreamRequest::RequestState state) OVERRIDE; | |
| 34 | |
| 35 void HandleRequestUpdate( | |
| 36 const content::MediaStreamDevice& device, | |
| 37 const content::MediaStreamRequest::RequestState state); | |
| 38 | |
| 39 Profile* const profile_; | |
| 40 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.
| |
| 41 | |
| 42 DISALLOW_COPY_AND_ASSIGN(TabCaptureEventRouter); | |
| 43 }; | |
| 44 | |
| 45 } // namespace extension | |
| 46 | |
| 47 #endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_EVENT_ROUTER_H_ | |
| OLD | NEW |