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

Unified Diff: extensions/browser/api/capture_web_contents_function.cc

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
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.
« no previous file with comments | « extensions/browser/api/capture_web_contents_function.h ('k') | extensions/browser/api/cast_channel/cast_auth_ica.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698