| Index: extensions/browser/api/capture_web_contents_function.cc
|
| diff --git a/extensions/browser/api/capture_web_contents_function.cc b/extensions/browser/api/capture_web_contents_function.cc
|
| index 7fa61894d81a071be6363f28f75adffbafbf3d8c..b8af449ef46341cb03db1645b5bc865edc15cf32 100644
|
| --- a/extensions/browser/api/capture_web_contents_function.cc
|
| +++ b/extensions/browser/api/capture_web_contents_function.cc
|
| @@ -23,7 +23,7 @@ using content::WebContents;
|
|
|
| namespace extensions {
|
|
|
| -using core_api::extension_types::ImageDetails;
|
| +using api::extension_types::ImageDetails;
|
|
|
| bool CaptureWebContentsFunction::HasPermission() {
|
| return true;
|
| @@ -50,16 +50,15 @@ bool CaptureWebContentsFunction::RunAsync() {
|
| return false;
|
|
|
| // The default format and quality setting used when encoding jpegs.
|
| - const core_api::extension_types::ImageFormat kDefaultFormat =
|
| - core_api::extension_types::IMAGE_FORMAT_JPEG;
|
| + const api::extension_types::ImageFormat kDefaultFormat =
|
| + api::extension_types::IMAGE_FORMAT_JPEG;
|
| const int kDefaultQuality = 90;
|
|
|
| image_format_ = kDefaultFormat;
|
| image_quality_ = kDefaultQuality;
|
|
|
| if (image_details) {
|
| - if (image_details->format !=
|
| - core_api::extension_types::IMAGE_FORMAT_NONE)
|
| + if (image_details->format != api::extension_types::IMAGE_FORMAT_NONE)
|
| image_format_ = image_details->format;
|
| if (image_details->quality.get())
|
| image_quality_ = *image_details->quality;
|
| @@ -110,7 +109,7 @@ void CaptureWebContentsFunction::OnCaptureSuccess(const SkBitmap& bitmap) {
|
| bool encoded = false;
|
| std::string mime_type;
|
| switch (image_format_) {
|
| - case core_api::extension_types::IMAGE_FORMAT_JPEG:
|
| + case api::extension_types::IMAGE_FORMAT_JPEG:
|
| encoded = gfx::JPEGCodec::Encode(
|
| reinterpret_cast<unsigned char*>(bitmap.getAddr32(0, 0)),
|
| gfx::JPEGCodec::FORMAT_SkBitmap,
|
| @@ -121,7 +120,7 @@ void CaptureWebContentsFunction::OnCaptureSuccess(const SkBitmap& bitmap) {
|
| &data);
|
| mime_type = kMimeTypeJpeg;
|
| break;
|
| - case core_api::extension_types::IMAGE_FORMAT_PNG:
|
| + case api::extension_types::IMAGE_FORMAT_PNG:
|
| encoded =
|
| gfx::PNGCodec::EncodeBGRASkBitmap(bitmap,
|
| true, // Discard transparency.
|
|
|