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

Unified Diff: ui/gfx/scoped_canvas.h

Issue 854713003: More old files deletion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix tryjobs? Created 5 years, 11 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 | « ui/gfx/render_text_win.cc ('k') | ui/gfx/scoped_cg_context_save_gstate_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/scoped_canvas.h
diff --git a/ui/gfx/scoped_canvas.h b/ui/gfx/scoped_canvas.h
deleted file mode 100644
index 2e59a07876089f3386de425cae934fd6b2d788d0..0000000000000000000000000000000000000000
--- a/ui/gfx/scoped_canvas.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef UI_GFX_SCOPED_CANVAS_H_
-#define UI_GFX_SCOPED_CANVAS_H_
-
-#include "ui/gfx/canvas.h"
-
-namespace gfx {
-
-// Saves the drawing state, and restores the state when going out of scope.
-class ScopedCanvas {
- public:
- explicit ScopedCanvas(gfx::Canvas* canvas) : canvas_(canvas) {
- if (canvas_)
- canvas_->Save();
- }
- ~ScopedCanvas() {
- if (canvas_)
- canvas_->Restore();
- }
- void SetCanvas(gfx::Canvas* canvas) {
- if (canvas_)
- canvas_->Restore();
- canvas_ = canvas;
- canvas_->Save();
- }
-
- private:
- gfx::Canvas* canvas_;
-
- DISALLOW_COPY_AND_ASSIGN(ScopedCanvas);
-};
-
-} // namespace gfx
-
-#endif // UI_GFX_SCOPED_CANVAS_H_
« no previous file with comments | « ui/gfx/render_text_win.cc ('k') | ui/gfx/scoped_cg_context_save_gstate_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698