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

Side by Side Diff: chrome/browser/extensions/api/chrome_extensions_api_client.cc

Issue 2837983002: Modify SetImageData to add additional items along with image data to save on clipboard. (Closed)
Patch Set: Nits and rebase. Created 3 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "chrome/browser/extensions/api/chrome_extensions_api_client.h" 5 #include "chrome/browser/extensions/api/chrome_extensions_api_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 if (!non_native_file_system_delegate_) { 185 if (!non_native_file_system_delegate_) {
186 non_native_file_system_delegate_ = 186 non_native_file_system_delegate_ =
187 base::MakeUnique<NonNativeFileSystemDelegateChromeOS>(); 187 base::MakeUnique<NonNativeFileSystemDelegateChromeOS>();
188 } 188 }
189 return non_native_file_system_delegate_.get(); 189 return non_native_file_system_delegate_.get();
190 } 190 }
191 191
192 void ChromeExtensionsAPIClient::SaveImageDataToClipboard( 192 void ChromeExtensionsAPIClient::SaveImageDataToClipboard(
193 const std::vector<char>& image_data, 193 const std::vector<char>& image_data,
194 api::clipboard::ImageType type, 194 api::clipboard::ImageType type,
195 AdditionalDataItemList additional_items,
195 const base::Closure& success_callback, 196 const base::Closure& success_callback,
196 const base::Callback<void(const std::string&)>& error_callback) { 197 const base::Callback<void(const std::string&)>& error_callback) {
197 if (!clipboard_extension_helper_) 198 if (!clipboard_extension_helper_)
198 clipboard_extension_helper_ = base::MakeUnique<ClipboardExtensionHelper>(); 199 clipboard_extension_helper_ = base::MakeUnique<ClipboardExtensionHelper>();
199 clipboard_extension_helper_->DecodeAndSaveImageData( 200 clipboard_extension_helper_->DecodeAndSaveImageData(
200 image_data, type, success_callback, error_callback); 201 image_data, type, std::move(additional_items), success_callback,
202 error_callback);
201 } 203 }
202 #endif 204 #endif
203 205
204 } // namespace extensions 206 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698