Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(494)

Side by Side Diff: chrome/browser/extensions/api/tab_capture/tab_capture_api.cc

Issue 14107010: Update tabCapture API docs with browser action info. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/common/extensions/api/tab_capture.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 23 matching lines...) Expand all
34 34
35 namespace extensions { 35 namespace extensions {
36 36
37 namespace { 37 namespace {
38 38
39 const char kCapturingSameTab[] = "Cannot capture a tab with an active stream."; 39 const char kCapturingSameTab[] = "Cannot capture a tab with an active stream.";
40 const char kFindingTabError[] = "Error finding tab to capture."; 40 const char kFindingTabError[] = "Error finding tab to capture.";
41 const char kNoAudioOrVideo[] = "Capture failed. No audio or video requested."; 41 const char kNoAudioOrVideo[] = "Capture failed. No audio or video requested.";
42 const char kPermissionError[] = "Tab Capture API flag is not enabled."; 42 const char kPermissionError[] = "Tab Capture API flag is not enabled.";
43 const char kGrantError[] = 43 const char kGrantError[] =
44 "Capture of this tab must be granted by clicking on the extension icon."; 44 "Extension has not been invoked for the current page (see activeTab "
45 "permission). Chrome pages cannot be captured.";
45 46
46 // Keys/values for media stream constraints. 47 // Keys/values for media stream constraints.
47 const char kMediaStreamSource[] = "chromeMediaSource"; 48 const char kMediaStreamSource[] = "chromeMediaSource";
48 const char kMediaStreamSourceId[] = "chromeMediaSourceId"; 49 const char kMediaStreamSourceId[] = "chromeMediaSourceId";
49 const char kMediaStreamSourceTab[] = "tab"; 50 const char kMediaStreamSourceTab[] = "tab";
50 51
51 } // namespace 52 } // namespace
52 53
53 bool TabCaptureCaptureFunction::RunImpl() { 54 bool TabCaptureCaptureFunction::RunImpl() {
54 if (!FeatureSwitch::tab_capture()->IsEnabled()) { 55 if (!FeatureSwitch::tab_capture()->IsEnabled()) {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 info->tab_id = it->first; 174 info->tab_id = it->first;
174 info->status = it->second; 175 info->status = it->second;
175 list->Append(info->ToValue().release()); 176 list->Append(info->ToValue().release());
176 } 177 }
177 178
178 SetResult(list); 179 SetResult(list);
179 return true; 180 return true;
180 } 181 }
181 182
182 } // namespace extensions 183 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/api/tab_capture.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698