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 // Implements the Chrome Extensions Tab Capture API. | 5 // Implements the Chrome Extensions Tab Capture API. |
6 | 6 |
7 #include "chrome/browser/extensions/api/tab_capture/tab_capture_api.h" | 7 #include "chrome/browser/extensions/api/tab_capture/tab_capture_api.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/strings/stringprintf.h" | 14 #include "base/strings/stringprintf.h" |
15 #include "base/values.h" | 15 #include "base/values.h" |
16 #include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h" | 16 #include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h" |
17 #include "chrome/browser/extensions/extension_renderer_state.h" | 17 #include "chrome/browser/extensions/extension_renderer_state.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/sessions/session_tab_helper.h" | 19 #include "chrome/browser/sessions/session_tab_helper.h" |
20 #include "chrome/browser/ui/browser.h" | 20 #include "chrome/browser/ui/browser.h" |
21 #include "chrome/browser/ui/browser_finder.h" | 21 #include "chrome/browser/ui/browser_finder.h" |
22 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 22 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
23 #include "chrome/common/chrome_switches.h" | |
24 #include "chrome/common/extensions/features/simple_feature.h" | 23 #include "chrome/common/extensions/features/simple_feature.h" |
25 #include "content/public/browser/render_process_host.h" | 24 #include "content/public/browser/render_process_host.h" |
26 #include "content/public/browser/render_view_host.h" | 25 #include "content/public/browser/render_view_host.h" |
27 #include "extensions/common/features/feature.h" | 26 #include "extensions/common/features/feature.h" |
28 #include "extensions/common/features/feature_provider.h" | 27 #include "extensions/common/features/feature_provider.h" |
29 #include "extensions/common/permissions/permissions_data.h" | 28 #include "extensions/common/permissions/permissions_data.h" |
| 29 #include "extensions/common/switches.h" |
30 | 30 |
31 using extensions::api::tab_capture::MediaStreamConstraint; | 31 using extensions::api::tab_capture::MediaStreamConstraint; |
32 | 32 |
33 namespace TabCapture = extensions::api::tab_capture; | 33 namespace TabCapture = extensions::api::tab_capture; |
34 namespace GetCapturedTabs = TabCapture::GetCapturedTabs; | 34 namespace GetCapturedTabs = TabCapture::GetCapturedTabs; |
35 | 35 |
36 namespace extensions { | 36 namespace extensions { |
37 | 37 |
38 namespace { | 38 namespace { |
39 | 39 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 info->tab_id = it->first; | 177 info->tab_id = it->first; |
178 info->status = it->second; | 178 info->status = it->second; |
179 list->Append(info->ToValue().release()); | 179 list->Append(info->ToValue().release()); |
180 } | 180 } |
181 | 181 |
182 SetResult(list); | 182 SetResult(list); |
183 return true; | 183 return true; |
184 } | 184 } |
185 | 185 |
186 } // namespace extensions | 186 } // namespace extensions |
OLD | NEW |