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

Side by Side Diff: components/native_app_window/draggable_region.cc

Issue 616253002: Extract NativeAppWindow from src/extensions Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: might fix athena. similarity=33 Created 6 years, 2 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
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/native_app_window/draggable_region.h"
6
7 #include "third_party/skia/include/core/SkRegion.h"
8
9 namespace native_app_window {
10
11 DraggableRegion::DraggableRegion() : draggable(false) {
12 }
13
14 SkRegion* RawDraggableRegionsToSkRegion(
15 const std::vector<DraggableRegion>& regions) {
16 SkRegion* sk_region = new SkRegion;
17 for (std::vector<DraggableRegion>::const_iterator iter = regions.begin();
18 iter != regions.end();
19 ++iter) {
20 const DraggableRegion& region = *iter;
21 sk_region->op(
22 region.bounds.x(),
23 region.bounds.y(),
24 region.bounds.right(),
25 region.bounds.bottom(),
26 region.draggable ? SkRegion::kUnion_Op : SkRegion::kDifference_Op);
27 }
28 return sk_region;
29 }
30
31 } // namespace native_app_window
OLDNEW
« no previous file with comments | « components/native_app_window/draggable_region.h ('k') | components/native_app_window/native_app_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698