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

Unified Diff: extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc

Issue 1833053004: [Extensions] Convert APIs to use movable types [10] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « extensions/browser/api/alarms/alarms_api.cc ('k') | extensions/browser/api/audio/audio_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc
diff --git a/extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc b/extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc
index de9945135665beab1a28c481f979498caeb6b363..661edcd8faaa58b1f4c9d42e2ef677f939a37841 100644
--- a/extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc
+++ b/extensions/browser/api/app_current_window_internal/app_current_window_internal_api.cc
@@ -334,15 +334,11 @@ bool AppCurrentWindowInternalSetShapeFunction::RunWithWindow(
// |rects| should be an empty list.
scoped_ptr<SkRegion> region(new SkRegion);
if (shape.rects) {
- for (std::vector<linked_ptr<RegionRect> >::const_iterator i =
- shape.rects->begin();
- i != shape.rects->end();
- ++i) {
- const RegionRect& inputRect = **i;
- int32_t x = inputRect.left;
- int32_t y = inputRect.top;
- int32_t width = inputRect.width;
- int32_t height = inputRect.height;
+ for (const RegionRect& input_rect : *shape.rects) {
+ int32_t x = input_rect.left;
+ int32_t y = input_rect.top;
+ int32_t width = input_rect.width;
+ int32_t height = input_rect.height;
SkIRect rect = SkIRect::MakeXYWH(x, y, width, height);
region->op(rect, SkRegion::kUnion_Op);
« no previous file with comments | « extensions/browser/api/alarms/alarms_api.cc ('k') | extensions/browser/api/audio/audio_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698