| Index: chrome/browser/extensions/api/tabs/tabs_api.cc
|
| diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| index ad2a7920d3da5de11b7c7a98facbbd3115118904..a1176106d3158048a3183e4271ae5551fbd71235 100644
|
| --- a/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| +++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
|
| @@ -1641,10 +1641,6 @@
|
| : chrome_details_(this) {
|
| }
|
|
|
| -bool TabsCaptureVisibleTabFunction::HasPermission() {
|
| - return true;
|
| -}
|
| -
|
| bool TabsCaptureVisibleTabFunction::IsScreenshotEnabled() {
|
| PrefService* service = chrome_details_.GetProfile()->GetPrefs();
|
| if (service->GetBoolean(prefs::kDisableScreenshots)) {
|
| @@ -1670,40 +1666,6 @@
|
| return NULL;
|
| }
|
| return contents;
|
| -}
|
| -
|
| -bool TabsCaptureVisibleTabFunction::RunAsync() {
|
| - using api::extension_types::ImageDetails;
|
| -
|
| - EXTENSION_FUNCTION_VALIDATE(args_);
|
| -
|
| - int context_id = extension_misc::kCurrentWindowId;
|
| - args_->GetInteger(0, &context_id);
|
| -
|
| - scoped_ptr<ImageDetails> image_details;
|
| - if (args_->GetSize() > 1) {
|
| - base::Value* spec = NULL;
|
| - EXTENSION_FUNCTION_VALIDATE(args_->Get(1, &spec) && spec);
|
| - image_details = ImageDetails::FromValue(*spec);
|
| - }
|
| -
|
| - WebContents* contents = GetWebContentsForID(context_id);
|
| -
|
| - return CaptureAsync(
|
| - contents, image_details.get(),
|
| - base::Bind(&TabsCaptureVisibleTabFunction::CopyFromBackingStoreComplete,
|
| - this));
|
| -}
|
| -
|
| -void TabsCaptureVisibleTabFunction::OnCaptureSuccess(const SkBitmap& bitmap) {
|
| - std::string base64_result;
|
| - if (!EncodeBitmap(bitmap, &base64_result)) {
|
| - OnCaptureFailure(FAILURE_REASON_ENCODING_FAILED);
|
| - return;
|
| - }
|
| -
|
| - SetResult(new base::StringValue(base64_result));
|
| - SendResponse(true);
|
| }
|
|
|
| void TabsCaptureVisibleTabFunction::OnCaptureFailure(FailureReason reason) {
|
|
|