| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/clipboard_extension_helper_chromeos.h" | 5 #include "chrome/browser/extensions/clipboard_extension_helper_chromeos.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
| 10 #include "base/synchronization/cancellation_flag.h" | 10 #include "base/synchronization/cancellation_flag.h" |
| 11 #include "chrome/browser/image_decoder.h" | 11 #include "components/image_fetcher/content/image_decoder.h" |
| 12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
| 13 #include "ui/base/clipboard/scoped_clipboard_writer.h" | 13 #include "ui/base/clipboard/scoped_clipboard_writer.h" |
| 14 | 14 |
| 15 using content::BrowserThread; | 15 using content::BrowserThread; |
| 16 | 16 |
| 17 namespace extensions { | 17 namespace extensions { |
| 18 | 18 |
| 19 namespace clipboard = api::clipboard; | 19 namespace clipboard = api::clipboard; |
| 20 | 20 |
| 21 class ClipboardExtensionHelper::ClipboardImageDataDecoder | 21 class ClipboardExtensionHelper::ClipboardImageDataDecoder |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 scw.WriteImage(bitmap); | 110 scw.WriteImage(bitmap); |
| 111 } | 111 } |
| 112 base::ResetAndReturn(&image_save_success_callback_).Run(); | 112 base::ResetAndReturn(&image_save_success_callback_).Run(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 void ClipboardExtensionHelper::OnImageDecodeCancel() { | 115 void ClipboardExtensionHelper::OnImageDecodeCancel() { |
| 116 base::ResetAndReturn(&image_save_error_callback_).Run("Request canceled"); | 116 base::ResetAndReturn(&image_save_error_callback_).Run("Request canceled"); |
| 117 } | 117 } |
| 118 | 118 |
| 119 } // namespace extensions | 119 } // namespace extensions |
| OLD | NEW |