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 #ifndef CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_REGISTRY_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_REGISTRY_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_REGISTRY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/scoped_vector.h" | |
14 #include "base/scoped_observer.h" | 13 #include "base/scoped_observer.h" |
15 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 14 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
16 #include "chrome/common/extensions/api/tab_capture.h" | 15 #include "chrome/common/extensions/api/tab_capture.h" |
17 #include "content/public/browser/media_request_state.h" | 16 #include "content/public/browser/media_request_state.h" |
18 #include "extensions/browser/browser_context_keyed_api_factory.h" | 17 #include "extensions/browser/browser_context_keyed_api_factory.h" |
19 #include "extensions/browser/extension_registry_observer.h" | 18 #include "extensions/browser/extension_registry_observer.h" |
20 | 19 |
21 namespace base { | 20 namespace base { |
22 class ListValue; | 21 class ListValue; |
23 } | 22 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // Look-up a LiveRequest associated with the given |target_contents| (or | 102 // Look-up a LiveRequest associated with the given |target_contents| (or |
104 // the originally targetted RenderFrameHost), if any. | 103 // the originally targetted RenderFrameHost), if any. |
105 LiveRequest* FindRequest(const content::WebContents* target_contents) const; | 104 LiveRequest* FindRequest(const content::WebContents* target_contents) const; |
106 LiveRequest* FindRequest(int original_target_render_process_id, | 105 LiveRequest* FindRequest(int original_target_render_process_id, |
107 int original_target_render_frame_id) const; | 106 int original_target_render_frame_id) const; |
108 | 107 |
109 // Removes the |request| from |requests_|, thus causing its destruction. | 108 // Removes the |request| from |requests_|, thus causing its destruction. |
110 void KillRequest(LiveRequest* request); | 109 void KillRequest(LiveRequest* request); |
111 | 110 |
112 content::BrowserContext* const browser_context_; | 111 content::BrowserContext* const browser_context_; |
113 ScopedVector<LiveRequest> requests_; | 112 std::vector<std::unique_ptr<LiveRequest>> requests_; |
114 | 113 |
115 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 114 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
116 extension_registry_observer_; | 115 extension_registry_observer_; |
117 | 116 |
118 DISALLOW_COPY_AND_ASSIGN(TabCaptureRegistry); | 117 DISALLOW_COPY_AND_ASSIGN(TabCaptureRegistry); |
119 }; | 118 }; |
120 | 119 |
121 } // namespace extensions | 120 } // namespace extensions |
122 | 121 |
123 #endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_REGISTRY_H_ | 122 #endif // CHROME_BROWSER_EXTENSIONS_API_TAB_CAPTURE_TAB_CAPTURE_REGISTRY_H_ |
OLD | NEW |