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

Side by Side Diff: ui/base/gtk/scoped_region.cc

Issue 231733005: Delete the GTK+ port of Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remerge to ToT Created 6 years, 8 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 | Annotate | Revision Log
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 "ui/base/gtk/scoped_region.h"
6
7 #include <gdk/gdk.h>
8
9 namespace ui {
10
11 ScopedRegion::ScopedRegion() : region_(NULL) {}
12
13 ScopedRegion::ScopedRegion(GdkRegion* region) : region_(region) {}
14
15 ScopedRegion::~ScopedRegion() {
16 Close();
17 }
18
19 void ScopedRegion::Set(GdkRegion* region) {
20 Close();
21 region_ = region;
22 }
23
24 GdkRegion* ScopedRegion::Get() {
25 return region_;
26 }
27
28 GdkRegion* ScopedRegion::release() {
29 GdkRegion* region = region_;
30 region_ = NULL;
31 return region;
32 }
33
34 void ScopedRegion::Close() {
35 if (region_) {
36 gdk_region_destroy(region_);
37 region_ = NULL;
38 }
39 }
40
41 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698